]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
11 years agortc: max77686: add Maxim 77686 driver
Jonghwa Lee [Wed, 20 Feb 2013 02:15:39 +0000 (13:15 +1100)]
rtc: max77686: add Maxim 77686 driver

Add a driver to support max77686 rtc.  MAX77686 rtc support smpl and wtsr
mode.  It has two alarm register which can be used for alarming to wake
system up.  This drvier uses regmap to access its register.

Signed-off-by: Chiwoong Byun <woong.byun@samsung.com>
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Signed-off-by: Myugnjoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agortc-ds1307-long-block-operations-bugfix-fix
Andrew Morton [Wed, 20 Feb 2013 02:15:39 +0000 (13:15 +1100)]
rtc-ds1307-long-block-operations-bugfix-fix

rework code to avoid 80-column overflows

Cc: Bertrand Achard <ba@cykian.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/rtc/rtc-ds1307.c: long block operations bugfix
Bertrand Achard [Wed, 20 Feb 2013 02:15:39 +0000 (13:15 +1100)]
drivers/rtc/rtc-ds1307.c: long block operations bugfix

The rtc-ds1307 driver does not properly handle block operations bigger
than 32 bytes in either of the two modes supported (SMbus native, or
emulated if not supported by the SMbus platform driver).

It also does not properly handle userland-supplied input (block operation
length) through sysfs and may suffer a type of buffer overrun.

The driver has been modified with proper input validation, buffer sizes,
and now splits block transfers bigger than 32 bytes into separate
transfers.

Explanation : Buffer size allocated is I2C_SMBUS_BLOCK_MAX which equals to
32 as per the SMbus spec.  Reads and write may be up to 56 bytes (to the
NVRAM).  This patch allocated a 255 byte buffer, the maximum allowable
(address is an u8).  It's not only a buffer problem, SMbus only supports
up to 32 bytes transfer at once, so it's needed to split bigger transfers.

Patch successfully tested on 3.2.27; cleanly applies on 3.7-rc4.

Signed-off-by: Bertrand Achard <ba@cykian.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers-rtc-rtc-pxac-fix-set-time-sync-time-issue-fix
Olof Johansson [Wed, 20 Feb 2013 02:15:38 +0000 (13:15 +1100)]
drivers-rtc-rtc-pxac-fix-set-time-sync-time-issue-fix

The "fix set time sync time issue" adds calls to udelay(), but
doesn't add the include file. End result is build breakage:

drivers/rtc/rtc-pxa.c: In function 'pxa_rtc_set_time':
drivers/rtc/rtc-pxa.c:267:2: error: implicit declaration of function 'udelay' [-Werror=implicit-function-declaration]

Signed-off-by: Olof Johansson <olof@lixom.net>
Cc: Leo Song <liangs@marvell.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/rtc/rtc-pxa.c: fix set time sync time issue
Leo Song [Wed, 20 Feb 2013 02:15:38 +0000 (13:15 +1100)]
drivers/rtc/rtc-pxa.c: fix set time sync time issue

Fix set time and sync time issue, add some delay when set pxa rtc timer
according to spec

Signed-off-by: Leo Song <liangs@marvell.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/rtc/rtc-pxa.c: fix alarm can't wake up system issue
Leo Song [Wed, 20 Feb 2013 02:15:38 +0000 (13:15 +1100)]
drivers/rtc/rtc-pxa.c: fix alarm can't wake up system issue

Fix alarm can't wake up system issue

Signed-off-by: Leo Song <liangs@marvell.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/rtc/rtc-pxa.c: fix alarm not match issue
Leo Song [Wed, 20 Feb 2013 02:15:37 +0000 (13:15 +1100)]
drivers/rtc/rtc-pxa.c: fix alarm not match issue

Fix pxa rtc alarm issue by setting week of month and day of week in
rdar/rdcr or it would not match.

Signed-off-by: Leo Song <liangs@marvell.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/rtc: dump small buffers via %*ph
Andy Shevchenko [Wed, 20 Feb 2013 02:15:37 +0000 (13:15 +1100)]
drivers/rtc: dump small buffers via %*ph

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agokernel/nsproxy.c: remove duplicate task_cred_xxx for user_ns
Yuanhan Liu [Wed, 20 Feb 2013 02:15:37 +0000 (13:15 +1100)]
kernel/nsproxy.c: remove duplicate task_cred_xxx for user_ns

We can use user_ns, which is also assigned from task_cred_xxx(tsk,
user_ns), at the beginning of copy_namespaces().

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobinfmt_elf.c: use get_random_int() to fix entropy depleting
Jeff Liu [Wed, 20 Feb 2013 02:15:37 +0000 (13:15 +1100)]
binfmt_elf.c: use get_random_int() to fix entropy depleting

Entropy is quickly depleted under normal operations like ls(1), cat(1),
etc...  between 2.6.30 to current mainline, for instance:

$ cat /proc/sys/kernel/random/entropy_avail
3428
$ cat /proc/sys/kernel/random/entropy_avail
2911
$cat /proc/sys/kernel/random/entropy_avail
2620

We observed this problem has been occurring since 2.6.30 with
fs/binfmt_elf.c: create_elf_tables()->get_random_bytes(), introduced by
f06295b44c296c8f ("ELF: implement AT_RANDOM for glibc PRNG seeding").

/*
 * Generate 16 random bytes for userspace PRNG seeding.
 */
get_random_bytes(k_rand_bytes, sizeof(k_rand_bytes));

The patch introduces a wrapper around get_random_int() which has lower
overhead than calling get_random_bytes() directly.

With this patch applied:
$ cat /proc/sys/kernel/random/entropy_avail
2731
$ cat /proc/sys/kernel/random/entropy_avail
2802
$ cat /proc/sys/kernel/random/entropy_avail
2878

Analyzed by John Sobecki.

Signed-off-by: Jie Liu <jeff.liu@oracle.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Andreas Dilger <aedilger@gmail.com>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Arnd Bergmann <arnn@arndb.de>
Cc: John Sobecki <john.sobecki@oracle.com>
Cc: James Morris <james.l.morris@oracle.com>
Cc: Jakub Jelinek <jakub@redhat.com>
Cc: Ted Ts'o <tytso@mit.edu>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Kees Cook <keescook@chromium.org>
Cc: Ulrich Drepper <drepper@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobinfmt_elf: remove unused argument in fill_elf_header
Zhang Yanfei [Wed, 20 Feb 2013 02:15:36 +0000 (13:15 +1100)]
binfmt_elf: remove unused argument in fill_elf_header

In fill_elf_header(), elf->e_ident[EI_OSABI] is always set to ELF_OSABI,
so remove the unused argument 'osabi'.

Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agoepoll: stop comparing pointers with 0 in self-test app
Sasha Levin [Wed, 20 Feb 2013 02:15:36 +0000 (13:15 +1100)]
epoll: stop comparing pointers with 0 in self-test app

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Reviewed-by: Daniel Hazelton <dshadowwolf@gmail.com>
Cc: "Paton J. Lewis" <palewis@adobe.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agoepoll: support for disabling items, and a self-test app
Paton J. Lewis [Wed, 20 Feb 2013 02:15:36 +0000 (13:15 +1100)]
epoll: support for disabling items, and a self-test app

It is not currently possible to reliably delete epoll items when using the
same epoll set from multiple threads.  After calling epoll_ctl with
EPOLL_CTL_DEL, another thread might still be executing code related to an
event for that epoll item (in response to epoll_wait).  Therefore the
deleting thread does not know when it is safe to delete resources
pertaining to the associated epoll item because another thread might be
using those resources.

The deleting thread could wait an arbitrary amount of time after calling
epoll_ctl with EPOLL_CTL_DEL and before deleting the item, but this is
inefficient and could result in the destruction of resources before
another thread is done handling an event returned by epoll_wait.

This patch enhances epoll_ctl to support EPOLL_CTL_DISABLE, which disables
an epoll item.  If epoll_ctl returns -EBUSY in this case, then another
thread may handling a return from epoll_wait for this item.  Otherwise if
epoll_ctl returns 0, then it is safe to delete the epoll item.  This
allows multiple threads to use a mutex to determine when it is safe to
delete an epoll item and its associated resources, which allows epoll
items to be deleted both efficiently and without error in a multi-threaded
environment.  Note that EPOLL_CTL_DISABLE is only useful in conjunction
with EPOLLONESHOT, and using EPOLL_CTL_DISABLE on an epoll item without
EPOLLONESHOT returns -EINVAL.

This patch also adds a new test_epoll self-test program to both
demonstrate the need for this feature and test it.

Signed-off-by: Paton J. Lewis <palewis@adobe.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Jason Baron <jbaron@redhat.com>
Cc: Paul Holland <pholland@adobe.com>
Cc: Davide Libenzi <davidel@xmailserver.org>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agocheckpatch: fix USLEEP_RANGE test
Bruce Allan [Wed, 20 Feb 2013 02:15:35 +0000 (13:15 +1100)]
checkpatch: fix USLEEP_RANGE test

Do not test udelay() for a value less than 10usec when passed a variable
instead of a hard-coded number; there is no way for checkpatch to know the
value of the variable.  As it is today, it will complain about variables
with alphanumeric characters plus '_', e.g.  foo_bar, but not variables
with other characters, eg.  foo->bar.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Cc: Andy Whitcroft <apw@canonical.com>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agocheckpatch: Add check for kcalloc argument order
Joe Perches [Wed, 20 Feb 2013 02:15:35 +0000 (13:15 +1100)]
checkpatch: Add check for kcalloc argument order

kcalloc is sometimes misused with the first and second arguments switched.

Same issue with kmalloc_array too.

Bleat if sizeof is the first argument

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agocheckpatch: don't emit the CamelCase warning for PageFoo
Joe Perches [Wed, 20 Feb 2013 02:15:35 +0000 (13:15 +1100)]
checkpatch: don't emit the CamelCase warning for PageFoo

I'm getting a ton of these:

WARNING: Avoid CamelCase: <PageTransHuge>
#140: FILE: mm/migrate.c:1576:
+       if (PageTransHuge(page) && page_count(page) != 3) {

So exclude anything which starts with "Page".

Tested-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agocheckpatch: add Joe to MAINTAINERS
Joe Perches [Wed, 20 Feb 2013 02:15:34 +0000 (13:15 +1100)]
checkpatch: add Joe to MAINTAINERS

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agocheckpatch: warn on unnecessary __dev<foo> section markings
Joe Perches [Wed, 20 Feb 2013 02:15:34 +0000 (13:15 +1100)]
checkpatch: warn on unnecessary __dev<foo> section markings

Get people to stop adding __devinit and __devexit section markings.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Andy Whitcroft <apw@canonical.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agocheckpatch: prefer dev_<level>( to dev_printk(KERN_<LEVEL>
Joe Perches [Wed, 20 Feb 2013 02:15:34 +0000 (13:15 +1100)]
checkpatch: prefer dev_<level>( to dev_printk(KERN_<LEVEL>

Add YA check to printk style.

dev_<level> uses are functions and generate smaller
object code than dev_printk(KERN_<LEVEL>.

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agolib/scatterlist: use page iterator in the mapping iterator
Imre Deak [Wed, 20 Feb 2013 02:15:33 +0000 (13:15 +1100)]
lib/scatterlist: use page iterator in the mapping iterator

For better code reuse use the newly added page iterator to iterate through
the pages.  The offset, length within the page is still calculated by the
mapping iterator as well as the actual mapping.  Idea from Tejun Heo.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Cc: Maxim Levitsky <maximlevitsky@gmail.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agolib/scatterlist: add simple page iterator
Imre Deak [Wed, 20 Feb 2013 02:15:33 +0000 (13:15 +1100)]
lib/scatterlist: add simple page iterator

Add an iterator to walk through a scatter list a page at a time starting
at a specific page offset.  As opposed to the mapping iterator this is
meant to be small, performing well even in simple loops like collecting
all pages on the scatterlist into an array or setting up an iommu table
based on the pages' DMA address.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Cc: Maxim Levitsky <maximlevitsky@gmail.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodecompressors: make the default XZ_DEC_* config match the selected architecture
Florian Fainelli [Wed, 20 Feb 2013 02:15:33 +0000 (13:15 +1100)]
decompressors: make the default XZ_DEC_* config match the selected architecture

Change the defautl XZ_DEC_* config symbol to match the configured
architecture.  It is perfectly legitimate to support multiple XZ BCJ
filters for different architectures (e.g.: to mount foreign squashfs/xz
compressed filesystems), it is however more natural not to select them all
by default, but only the one matching the configured architecture.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Acked-by: Lasse Collin <lasse.collin@tukaani.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodecompressors: drop dependency on CONFIG_EXPERT
Florian Fainelli [Wed, 20 Feb 2013 02:15:32 +0000 (13:15 +1100)]
decompressors: drop dependency on CONFIG_EXPERT

Remove the XZ_DEC_* depedencey on CONFIG_EXPERT as recommended by Lasse
Colin.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Acked-by: Lasse Collin <lasse.collin@tukaani.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodecompressors: group XZ_DEC_* symbols under an if XZ_BCJ / endif
Florian Fainelli [Wed, 20 Feb 2013 02:15:32 +0000 (13:15 +1100)]
decompressors: group XZ_DEC_* symbols under an if XZ_BCJ / endif

Group all architecture-specific BCJ filter configuration symbols under an
if XZ_BCJ / endif statement.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Acked-by: Lasse Collin <lasse.collin@tukaani.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agolib/parser.c: fix up comments for valid return values from match_number
Namjae Jeon [Wed, 20 Feb 2013 02:15:32 +0000 (13:15 +1100)]
lib/parser.c: fix up comments for valid return values from match_number

match_number() has return values of -ENOMEM, -EINVAL and -ERANGE.  So, for
all the functions calling match_number, the return value should include
these values.  Fix up the comments to reflect the correct values.

Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/leds/leds-ot200.c: fix error caused by shifted mask
Christian Gmeiner [Wed, 20 Feb 2013 02:15:31 +0000 (13:15 +1100)]
drivers/leds/leds-ot200.c: fix error caused by shifted mask

During the development of this driver an in-house register documentation
was used.  The last week some integration tests were done and this problem
was found.  It turned out that the released register documentation is
wrong.

The fix is very simple: shift all masks by one.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Cc: Bryan Wu <cooloney@gmail.com>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/video/backlight/adp88?0_bl.c: fix resume
Lars-Peter Clausen [Wed, 20 Feb 2013 02:15:31 +0000 (13:15 +1100)]
drivers/video/backlight/adp88?0_bl.c: fix resume

Clearing the NSTBY bit in the control register also automatically clears
the BLEN bit.  So we need to make sure to set it again during resume,
otherwise the backlight will stay off.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/video/backlight/lm3630_bl.c: remove ret = -EIO of lm3630_backlight_register()
Jingoo Han [Wed, 20 Feb 2013 02:15:31 +0000 (13:15 +1100)]
drivers/video/backlight/lm3630_bl.c: remove ret = -EIO of lm3630_backlight_register()

There is no need to return -EIO, because backlight_device_register()
already returns correct error values.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Daniel Jeong <daniel.jeong@ti.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/video/backlight/s6e63m0.c: report ->gamma_table_count correctly
Dan Carpenter [Wed, 20 Feb 2013 02:15:31 +0000 (13:15 +1100)]
drivers/video/backlight/s6e63m0.c: report ->gamma_table_count correctly

gamma_table has 3 arrays which each hold MAX_GAMMA_LEVEL pointers to int.

The current code sets ->gamma_table_count to 6 on 64bit arches and to 3 on
32 bit arches.  It should be 3 on everything.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Jingoo Han <jg1.han@samsung.com>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/video/backlight/88pm860x_bl.c: add missing of_node_put()
Axel Lin [Wed, 20 Feb 2013 02:15:30 +0000 (13:15 +1100)]
drivers/video/backlight/88pm860x_bl.c: add missing of_node_put()

of_find_node_by_name() returns a node pointer with refcount incremented,
use of_node_put() on it when done.

of_find_node_by_name() will call of_node_put() against the node pass to
from parameter, thus we also need to call of_node_get(from) before calling
of_find_node_by_name().

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Cc: Jingoo Han <jg1.han@samsung.com>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: as3711: fix compilation breakage
Guennadi Liakhovetski [Wed, 20 Feb 2013 02:15:30 +0000 (13:15 +1100)]
backlight: as3711: fix compilation breakage

Include the missing platform_device.h header to fix errors like

error: implicit declaration of function 'platform_set_drvdata'

and similar.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: add an AS3711 PMIC backlight driver
Guennadi Liakhovetski [Wed, 20 Feb 2013 02:15:30 +0000 (13:15 +1100)]
backlight: add an AS3711 PMIC backlight driver

This is an initial commit of a backlight driver, using step-up DCDC power
supplies on AS3711 PMIC. Only one mode has actually been tested, several
further modes have been implemented "dry," but disabled to avoid accidental
hardware damage. Anyone wishing to use any of those modes will have to
modify the driver.

Tested on sh73a0-based kzm9g board.  Only one mode has been tested and is
enabled.  That mode copies the sample code from the manufacturer.
Deviations from that code proved to be fatal for the hardware...

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Magnus Damm <magnus.damm@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Acked-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/video/backlight/Makefile: cleanup
Andrew Morton [Wed, 20 Feb 2013 02:15:29 +0000 (13:15 +1100)]
drivers/video/backlight/Makefile: cleanup

Fix up indenting.  Also alphasort all entries, which reduces patch
collisions.

Cc: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agofb: hx8357: Use static arrays for LCD configuration
Maxime Ripard [Wed, 20 Feb 2013 02:15:29 +0000 (13:15 +1100)]
fb: hx8357: Use static arrays for LCD configuration

This allows a smaller and less error-prone code by using static arrays
and the ARRAY_SIZE macro.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Jingoo Han <jg1.han@samsung.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agofb: hx8357: Remove trailing period
Maxime Ripard [Wed, 20 Feb 2013 02:15:29 +0000 (13:15 +1100)]
fb: hx8357: Remove trailing period

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Jingoo Han <jg1.han@samsung.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agofb: hx8357: Remove useless error message
Maxime Ripard [Wed, 20 Feb 2013 02:15:28 +0000 (13:15 +1100)]
fb: hx8357: Remove useless error message

In case of a failing allocation, a dump stack will be printed anyway, so
the dev_err is redundant.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Jingoo Han <jg1.han@samsung.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agofb: hx8357: Fix inverted parameters for kcalloc
Maxime Ripard [Wed, 20 Feb 2013 02:15:28 +0000 (13:15 +1100)]
fb: hx8357: Fix inverted parameters for kcalloc

The element size and the number of elements was inverted in the kcalloc
call.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Jingoo Han <jg1.han@samsung.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agofb: hx8357: Change parameters of the write function to u8
Maxime Ripard [Wed, 20 Feb 2013 02:15:28 +0000 (13:15 +1100)]
fb: hx8357: Change parameters of the write function to u8

Moving from void* to u8* removes the need for castslater on in the
function.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Jingoo Han <jg1.han@samsung.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agofb: backlight: add the Himax HX-8357B LCD controller
Maxime Ripard [Wed, 20 Feb 2013 02:15:27 +0000 (13:15 +1100)]
fb: backlight: add the Himax HX-8357B LCD controller

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Jingoo Han <jg1.han@samsung.com>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: Brian Lilly <brian@crystalfontz.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/video/backlight/ld9040.c: use devm_regulator_bulk_get() API
Sachin Kamat [Wed, 20 Feb 2013 02:15:27 +0000 (13:15 +1100)]
drivers/video/backlight/ld9040.c: use devm_regulator_bulk_get() API

devm_regulator_bulk_get is device managed and saves some cleanup
and exit code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Donghwa Lee <dh09.lee@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/video/backlight/l4f00242t03.c: convert to devm_regulator_get()
Axel Lin [Wed, 20 Feb 2013 02:15:27 +0000 (13:15 +1100)]
drivers/video/backlight/l4f00242t03.c: convert to devm_regulator_get()

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Jingoo Han <jg1.han@samsung.com>
Cc: Alberto Panizzo <maramaopercheseimorto@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/video/backlight/lm3639_bl.c: remove ret = -EIO at error paths of probe
Devendra Naga [Wed, 20 Feb 2013 02:15:27 +0000 (13:15 +1100)]
drivers/video/backlight/lm3639_bl.c: remove ret = -EIO at error paths of probe

The APIs are returning correctly the err codes, no need to assign -EIO
to the ret again.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Acked-by: Daniel Jeong <daniel.jeong@ti.com>
Cc: G.Shark Jeong <gshark.jeong@gmail.com>
Acked-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: corgi_lcd: use lcd_get_data instead of dev_get_drvdata
Jingoo Han [Wed, 20 Feb 2013 02:15:26 +0000 (13:15 +1100)]
backlight: corgi_lcd: use lcd_get_data instead of dev_get_drvdata

Use the wrapper function for getting the driver data using lcd_device
instead of using dev_get_drvdata with &ld->dev, so we can directly pass a
struct lcd_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: omap1: use bl_get_data instead of dev_get_drvdata
Jingoo Han [Wed, 20 Feb 2013 02:15:26 +0000 (13:15 +1100)]
backlight: omap1: use bl_get_data instead of dev_get_drvdata

Use the wrapper function for getting the driver data using
backlight_device instead of using dev_get_drvdata with &bd->dev, so we can
directly pass a struct backlight_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: tosa: use bl_get_data instead of dev_get_drvdata
Jingoo Han [Wed, 20 Feb 2013 02:15:26 +0000 (13:15 +1100)]
backlight: tosa: use bl_get_data instead of dev_get_drvdata

Use the wrapper function for getting the driver data using
backlight_device instead of using dev_get_drvdata with &bd->dev, so we can
directly pass a struct backlight_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: corgi_lcd: use bl_get_data instead of dev_get_drvdata
Jingoo Han [Wed, 20 Feb 2013 02:15:25 +0000 (13:15 +1100)]
backlight: corgi_lcd: use bl_get_data instead of dev_get_drvdata

Use the wrapper function for getting the driver data using
backlight_device instead of using dev_get_drvdata with &bd->dev, so we can
directly pass a struct backlight_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: ams369fg06: use bl_get_data instead of dev_get_drvdata
Jingoo Han [Wed, 20 Feb 2013 02:15:25 +0000 (13:15 +1100)]
backlight: ams369fg06: use bl_get_data instead of dev_get_drvdata

Use the wrapper function for getting the driver data using
backlight_device instead of using dev_get_drvdata with &bd->dev, so we can
directly pass a struct backlight_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agopwm_backlight: use bl_get_data instead of dev_get_drvdata
Jingoo Han [Wed, 20 Feb 2013 02:15:25 +0000 (13:15 +1100)]
pwm_backlight: use bl_get_data instead of dev_get_drvdata

Use the wrapper function for getting the driver data using
backlight_device instead of using dev_get_drvdata with &bd->dev, so we can
directly pass a struct backlight_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Cc: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: aat2870: use bl_get_data instead of dev_get_drvdata
Jingoo Han [Wed, 20 Feb 2013 02:15:24 +0000 (13:15 +1100)]
backlight: aat2870: use bl_get_data instead of dev_get_drvdata

Use the wrapper function for getting the driver data using
backlight_device instead of using dev_get_drvdata with &bd->dev, so we can
directly pass a struct backlight_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: lms501kf03: use spi_get_drvdata and spi_set_drvdata
Jingoo Han [Wed, 20 Feb 2013 02:15:24 +0000 (13:15 +1100)]
backlight: lms501kf03: use spi_get_drvdata and spi_set_drvdata

Use the wrapper functions for getting and setting the driver data using
spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we
can directly pass a struct spi_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: corgi_lcd: use spi_get_drvdata and spi_set_drvdata
Jingoo Han [Wed, 20 Feb 2013 02:15:24 +0000 (13:15 +1100)]
backlight: corgi_lcd: use spi_get_drvdata and spi_set_drvdata

Use the wrapper functions for getting and setting the driver data using
spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we
can directly pass a struct spi_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: tosa: use spi_get_drvdata and spi_set_drvdata
Jingoo Han [Wed, 20 Feb 2013 02:15:23 +0000 (13:15 +1100)]
backlight: tosa: use spi_get_drvdata and spi_set_drvdata

Use the wrapper functions for getting and setting the driver data using
spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we
can directly pass a struct spi_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: vgg2432a4: use spi_get_drvdata and spi_set_drvdata
Jingoo Han [Wed, 20 Feb 2013 02:15:23 +0000 (13:15 +1100)]
backlight: vgg2432a4: use spi_get_drvdata and spi_set_drvdata

Use the wrapper functions for getting and setting the driver data using
spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we
can directly pass a struct spi_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: ams369fg06: use spi_get_drvdata and spi_set_drvdata
Jingoo Han [Wed, 20 Feb 2013 02:15:23 +0000 (13:15 +1100)]
backlight: ams369fg06: use spi_get_drvdata and spi_set_drvdata

Use the wrapper functions for getting and setting the driver data using
spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we
can directly pass a struct spi_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: lms283gf05: use spi_get_drvdata and spi_set_drvdata
Jingoo Han [Wed, 20 Feb 2013 02:15:22 +0000 (13:15 +1100)]
backlight: lms283gf05: use spi_get_drvdata and spi_set_drvdata

Use the wrapper functions for getting and setting the driver data using
spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we
can directly pass a struct spi_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: tdo24m: use spi_get_drvdata and spi_set_drvdata
Jingoo Han [Wed, 20 Feb 2013 02:15:22 +0000 (13:15 +1100)]
backlight: tdo24m: use spi_get_drvdata and spi_set_drvdata

Use the wrapper functions for getting and setting the driver data using
spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we
can directly pass a struct spi_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: ltv350qv: use spi_get_drvdata and spi_set_drvdata
Jingoo Han [Wed, 20 Feb 2013 02:15:22 +0000 (13:15 +1100)]
backlight: ltv350qv: use spi_get_drvdata and spi_set_drvdata

Use the wrapper functions for getting and setting the driver data using
spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we
can directly pass a struct spi_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: s6e63m0: use spi_get_drvdata and spi_set_drvdata
Jingoo Han [Wed, 20 Feb 2013 02:15:21 +0000 (13:15 +1100)]
backlight: s6e63m0: use spi_get_drvdata and spi_set_drvdata

Use the wrapper functions for getting and setting the driver data using
spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we
can directly pass a struct spi_device

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: ld9040: use spi_get_drvdata and spi_set_drvdata
Jingoo Han [Wed, 20 Feb 2013 02:15:21 +0000 (13:15 +1100)]
backlight: ld9040: use spi_get_drvdata and spi_set_drvdata

Use the wrapper functions for getting and setting the driver data using
spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we
can directly pass a struct spi_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: l4f00242t03: use spi_get_drvdata and spi_set_drvdata
Jingoo Han [Wed, 20 Feb 2013 02:15:21 +0000 (13:15 +1100)]
backlight: l4f00242t03: use spi_get_drvdata and spi_set_drvdata

Use the wrapper functions for getting and setting the driver data using
spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we
can directly pass a struct spi_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight-add-new-lp8788-backlight-driver-checkpatch-fixes
Andrew Morton [Wed, 20 Feb 2013 02:15:21 +0000 (13:15 +1100)]
backlight-add-new-lp8788-backlight-driver-checkpatch-fixes

WARNING: please write a paragraph that describes the config symbol fully
#45: FILE: drivers/video/backlight/Kconfig:380:
+config BACKLIGHT_LP8788

ERROR: code indent should use tabs where possible
#446: FILE: include/linux/mfd/lp8788.h:242:
+^I^I            Only valid when bl_mode is LP8788_BL_COMB_PWM_BASED$

total: 1 errors, 1 warnings, 403 lines checked

NOTE: whitespace errors detected, you may wish to use scripts/cleanpatch or
      scripts/cleanfile

./patches/backlight-add-new-lp8788-backlight-driver.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: "Kim, Milo" <Milo.Kim@ti.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: add new lp8788 backlight driver
Kim, Milo [Wed, 20 Feb 2013 02:15:20 +0000 (13:15 +1100)]
backlight: add new lp8788 backlight driver

TI LP8788 PMU supports regulators, battery charger, RTC, ADC, backlight
dri= ver and current sinks.  This patch enables LP8788 backlight module.

(Brightness mode)
The brightness is controlled by PWM input or I2C register.
All modes are supported in the driver.

(Platform data)
Configurable data can be defined in the platform side.
 name                  : backlight driver name. (default: "lcd-backlight")
 initial_brightness    : initial value of backlight brightness
 bl_mode               : brightness control by PWM or lp8788 register
 dim_mode              : dimming mode selection
 full_scale            : full scale current setting
 rise_time             : brightness ramp up step time
 fall_time             : brightness ramp down step time
 pwm_pol               : PWM polarity setting when bl_mode is PWM based
 period_ns             : platform specific PWM period value. unit is nano.

The default values are set in case no platform data is defined.

Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Thierry Reding <thierry.reding@avionic-design.de>
Cc: "devendra.aaru" <devendra.aaru@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: ams369fg06: reorder inclusions of <linux/xxx.h>
Jingoo Han [Wed, 20 Feb 2013 02:15:20 +0000 (13:15 +1100)]
backlight: ams369fg06: reorder inclusions of <linux/xxx.h>

Reorder inclusions of <linux/xxx.h> for redability, according to
alphabetical ordering.  Also, unnecessary header comments are removed.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: ams369fg06: remove redundant variable 'before_power'
Jingoo Han [Wed, 20 Feb 2013 02:15:20 +0000 (13:15 +1100)]
backlight: ams369fg06: remove redundant variable 'before_power'

'before_power' was used to check the previous status when resume() is
called.  However, FB_BLANK_POWERDOWN was used in suspend() all the time,
so there is no need to check the previous status.  Also, redundant return
variables are removed to reduce the code.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: ams369fg06: replace EFAULT with EINVAL
Jingoo Han [Wed, 20 Feb 2013 02:15:19 +0000 (13:15 +1100)]
backlight: ams369fg06: replace EFAULT with EINVAL

Replace EFAULT with EINVAL, because EFAULT tends to be for the invalid
memory addresses.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: ams369fg06: remove unnecessary NULL deference check
Jingoo Han [Wed, 20 Feb 2013 02:15:19 +0000 (13:15 +1100)]
backlight: ams369fg06: remove unnecessary NULL deference check

Remove unnecessary NULL deference check, because it was already checked in
ams369fg06_probe().  Also, unnecessary parentheses are removed in
ams369fg06_power_is_on().

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: ams369fg06: use sleep instead of delay
Jingoo Han [Wed, 20 Feb 2013 02:15:19 +0000 (13:15 +1100)]
backlight: ams369fg06: use sleep instead of delay

Replace mdelay with msleep to remove the busy loop waiting.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: s6e63m0: reorder inclusions of <linux/xxx.h>
Jingoo Han [Wed, 20 Feb 2013 02:15:18 +0000 (13:15 +1100)]
backlight: s6e63m0: reorder inclusions of <linux/xxx.h>

Reorder inclusions of <linux/xxx.h> for redability, according to
alphabetical ordering.  Also, unnecessary header comments are removed.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: s6e63m0: remove redundant variable 'before_power'
Jingoo Han [Wed, 20 Feb 2013 02:15:18 +0000 (13:15 +1100)]
backlight: s6e63m0: remove redundant variable 'before_power'

'before_power' was used to check the previous status when resume() is
called.  However, FB_BLANK_POWERDOWN was used in suspend() all the time,
so there is no need to check the previous status.  Also, redundant return
variables are removed to reduce the code.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: s6e63m0: replace EFAULT with EINVAL
Jingoo Han [Wed, 20 Feb 2013 02:15:18 +0000 (13:15 +1100)]
backlight: s6e63m0: replace EFAULT with EINVAL

Replace EFAULT with EINVAL, because EFAULT tends to be for the invalid
memory addresses.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: s6e63m0: remove unnecessary NULL deference check
Jingoo Han [Wed, 20 Feb 2013 02:15:17 +0000 (13:15 +1100)]
backlight: s6e63m0: remove unnecessary NULL deference check

Remove unnecessary NULL deference check, because it was already checked in
s6e63m0_probe().  Also, POWER_IS_ON is replaced with
s6e63m0_power_is_on().

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: s6e63m0: use sleep instead of delay
Jingoo Han [Wed, 20 Feb 2013 02:15:17 +0000 (13:15 +1100)]
backlight: s6e63m0: use sleep instead of delay

Replace mdelay with msleep to remove the busy loop waiting.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: s6e63m0: use lowercase names of structs
Jingoo Han [Wed, 20 Feb 2013 02:15:17 +0000 (13:15 +1100)]
backlight: s6e63m0: use lowercase names of structs

Lowercase names of structs should be used, because they are
not preprocessor macros.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: ld9040: reorder inclusions of <linux/xxx.h>
Jingoo Han [Wed, 20 Feb 2013 02:15:17 +0000 (13:15 +1100)]
backlight: ld9040: reorder inclusions of <linux/xxx.h>

Reorder inclusions of <linux/xxx.h> for redability, according to
alphabetical ordering.  Also, unnecessary header comments are removed.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: ld9040: remove redundant return variables
Jingoo Han [Wed, 20 Feb 2013 02:15:16 +0000 (13:15 +1100)]
backlight: ld9040: remove redundant return variables

Redundant return variables are removed to reduce the code.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: ld9040: replace EFAULT with EINVAL
Jingoo Han [Wed, 20 Feb 2013 02:15:16 +0000 (13:15 +1100)]
backlight: ld9040: replace EFAULT with EINVAL

Replace EFAULT with EINVAL, because EFAULT tends to be for the invalid
memory addresses.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: ld9040: remove unnecessary NULL deference check
Jingoo Han [Wed, 20 Feb 2013 02:15:16 +0000 (13:15 +1100)]
backlight: ld9040: remove unnecessary NULL deference check

Removee unnecessary NULL deference check, because it was already checked
in ld9040_probe().  Also, power_is_on is replaced with
ld9040_power_is_on().

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: ld9040: use sleep instead of delay
Jingoo Han [Wed, 20 Feb 2013 02:15:15 +0000 (13:15 +1100)]
backlight: ld9040: use sleep instead of delay

Replace mdelay with msleep to remove the busy loop waiting.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight-add-lms501kf03-lcd-driver-fix-fix
Andrew Morton [Wed, 20 Feb 2013 02:15:15 +0000 (13:15 +1100)]
backlight-add-lms501kf03-lcd-driver-fix-fix

make lms501kf03_shutdown() static, per Fengguang

Cc: "devendra.aaru" <devendra.aaru@gmail.com>
Cc: Ilho Lee <Ilho215.lee@samsung.com>
Cc: Jingoo Han <jg1.han@samsung.com>
Cc: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight-add-lms501kf03-lcd-driver-fix
Andrew Morton [Wed, 20 Feb 2013 02:15:15 +0000 (13:15 +1100)]
backlight-add-lms501kf03-lcd-driver-fix

remove unused variable `before_power'

Cc: "devendra.aaru" <devendra.aaru@gmail.com>
Cc: Ilho Lee <Ilho215.lee@samsung.com>
Cc: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: add lms501kf03 LCD driver
Jingoo Han [Wed, 20 Feb 2013 02:15:14 +0000 (13:15 +1100)]
backlight: add lms501kf03 LCD driver

Add the lms501kf03 LCD panel driver.  The lms501kf03 LCD panel (800 x 480)
driver uses 3-wired SPI inteface.

Signed-off-by: Ilho Lee <Ilho215.lee@samsung.com>
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Cc: "devendra.aaru" <devendra.aaru@gmail.com>
Cc: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agomaintainers-remove-mark-m-hoffman-fix
Andrew Morton [Wed, 20 Feb 2013 02:15:14 +0000 (13:15 +1100)]
maintainers-remove-mark-m-hoffman-fix

Cc: "Mark M. Hoffman" <mhoffman@lightlink.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agoMAINTAINERS: Remove Mark M. Hoffman
Jean Delvare [Wed, 20 Feb 2013 02:15:14 +0000 (13:15 +1100)]
MAINTAINERS: Remove Mark M. Hoffman

Mark M.  Hoffman stopped working on the Linux kernel several years ago, so
he should no longer be listed as a driver maintainer.  I'm not even sure
if his e-mail address still works.

I can take over 3 drivers he was responsible for, the 4th one will
fall down to the subsystem maintainer.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: "Mark M. Hoffman" <mhoffman@lightlink.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agoMAINTAINERS: mm: add additional include files to listing
Cody P Schafer [Wed, 20 Feb 2013 02:15:13 +0000 (13:15 +1100)]
MAINTAINERS: mm: add additional include files to listing

Add gfp.h, mmzone.h, memory_hotplug.h & vmalloc.h to the "MEMORY
MANAGMENT" section so scripts/get_maintainer.pl can do a better job of
making recommendations.

Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agoget_maintainer: allow keywords to match filenames
Stephen Warren [Wed, 20 Feb 2013 02:15:13 +0000 (13:15 +1100)]
get_maintainer: allow keywords to match filenames

Allow K: entries in MAINTAINERS to match directly against filenames;
either those extracted from patch +++ or --- lines, or those specified on
the command-line using the -f option.

This potentially allows fewer lines in a MAINTAINERS entry, if all the
relevant files are scattered throughout the whole kernel tree, yet contain
some common keyword.  An example would be using an ARM SoC name as the
keyword to catch all related drivers.

I don't think setting exact_pattern_match_hash would be appropriate here;
at least for intended Tegra use case, this feature is to ensure that all
Tegra-related driver changes get Cc'd to the Tegra mailing list.  Setting
exact_pattern_match_hash would prevent git history parsing for e.g.  S-o-b
tags, which still seems like it would be useful.  Hence, this flag isn't
set.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agoget_maintainer.pl: find maintainers for removed files
Geert Uytterhoeven [Wed, 20 Feb 2013 02:15:13 +0000 (13:15 +1100)]
get_maintainer.pl: find maintainers for removed files

For removed files, get_maintainer.pl doesn't find any maintainers (besides
the default linux-kernel@vger.kernel.org), as it only looks at the "+++"
lines, which are "/dev/null" for removals.  Fix this by extending the
parsing to the "---" lines.

E.g. for the two line test patch below the real score maintainers will now
be found:

    --- a/arch/score/include/asm/dma-mapping.h
    +++ /dev/null

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agoprintk: add pr_devel_once and pr_devel_ratelimited
Mikhail Gruzdev [Wed, 20 Feb 2013 02:15:12 +0000 (13:15 +1100)]
printk: add pr_devel_once and pr_devel_ratelimited

Standardize pr_devel logging macros family by adding pr_devel_once and
pr_devel_ratelimited.

Signed-off-by: Mikhail Gruzdev <michail.gruzdev@gmail.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agolib/vsprintf.c: add %pa format specifier for phys_addr_t types
Stepan Moskovchenko [Wed, 20 Feb 2013 02:15:12 +0000 (13:15 +1100)]
lib/vsprintf.c: add %pa format specifier for phys_addr_t types

Add the %pa format specifier for printing a phys_addr_t type and its
derivative types (such as resource_size_t), since the physical address
size on some platforms can vary based on build options, regardless of the
native integer type.

Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
Cc: Rob Landley <rob@landley.net>
Cc: George Spelvin <linux@horizon.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agokernel/smp.c: cleanups
Andrew Morton [Wed, 20 Feb 2013 02:15:12 +0000 (13:15 +1100)]
kernel/smp.c: cleanups

We sometimes use "struct call_single_data *data" and sometimes "struct
call_single_data *csd".  Use "csd" consistently.

We sometimes use "struct call_function_data *data" and sometimes "struct
call_function_data *cfd".  Use "cfd" consistently.

Also, avoid some 80-col layout tricks.

Cc: Ingo Molnar <mingo@elte.hu>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Shaohua Li <shli@fusionio.com>
Cc: Shaohua Li <shli@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agoinclude/linux/fs.h: disable preempt when acquire i_size_seqcount write lock
Fan Du [Wed, 20 Feb 2013 02:15:11 +0000 (13:15 +1100)]
include/linux/fs.h: disable preempt when acquire i_size_seqcount write lock

Two rt tasks bind to one CPU core.

The higher priority rt task A preempts a lower priority rt task B which
has already taken the write seq lock, and then the higher priority rt task
A try to acquire read seq lock, it's doomed to lockup.

rt task A with lower priority: call write
i_size_write                                        rt task B with higher priority: call sync, and preempt task A
  write_seqcount_begin(&inode->i_size_seqcount);    i_size_read
  inode->i_size = i_size;                             read_seqcount_begin <-- lockup here...

So disable preempt when acquiring every i_size_seqcount *write* lock will
cure the problem.

Signed-off-by: Fan Du <fan.du@windriver.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agosmp: Give WARN()ing when calling smp_call_function_many()/single() in serving irq
Chuansheng Liu [Wed, 20 Feb 2013 02:15:11 +0000 (13:15 +1100)]
smp: Give WARN()ing when calling smp_call_function_many()/single() in serving irq

Currently the functions smp_call_function_many()/single() will give a
WARN()ing only in the case of irqs_disabled(), but that check is not
enough to guarantee execution of the SMP cross-calls.

In many other cases such as softirq handling/interrupt handling, the two
APIs still can not be called, just as the smp_call_function_many()
comments say:

  * You must not call this function with disabled interrupts or from a
  * hardware interrupt handler or from a bottom half handler. Preemption
  * must be disabled when calling this function.

There is a real case for softirq DEADLOCK case:

CPUA                            CPUB
                                spin_lock(&spinlock)
                                Any irq coming, call the irq handler
                                irq_exit()
spin_lock_irq(&spinlock)
<== Blocking here due to
CPUB hold it
                                  __do_softirq()
                                    run_timer_softirq()
                                      timer_cb()
                                        call smp_call_function_many()
                                          send IPI interrupt to CPUA
                                            wait_csd()

Then both CPUA and CPUB will be deadlocked here.

So we should give a warning in the nmi, hardirq or softirq context as well.

Moreover, adding one new macro in_serving_irq() which indicates we are
processing nmi, hardirq or sofirq.

Signed-off-by: liu chuansheng <chuansheng.liu@intel.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Tested-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agosys_prctl(): coding-style cleanup
Andrew Morton [Wed, 20 Feb 2013 02:15:11 +0000 (13:15 +1100)]
sys_prctl(): coding-style cleanup

Remove a tabstop from the switch statement, in the usual fashion.  A few
instances of weirdwrapping were removed as a result.

Cc: Chen Gang <gang.chen@asianux.com>
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agosys_prctl(): arg2 is unsigned long which is never < 0
Chen Gang [Wed, 20 Feb 2013 02:15:10 +0000 (13:15 +1100)]
sys_prctl(): arg2 is unsigned long which is never < 0

arg2 will never < 0, for its type is 'unsigned long'

Also, use the provided macros.

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Reported-by: Cyrill Gorcunov <gorcunov@openvz.org>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agosun.com documentation fixes
Christian Kujau [Wed, 20 Feb 2013 02:15:10 +0000 (13:15 +1100)]
sun.com documentation fixes

After I came across a help text for SUNGEM mentioning a broken sun.com
URL, I felt like fixing those up, as they are now pointing to oracle.com
URLs.

Signed-off-by: Christian Kujau <lists@nerdbynature.de>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agolib/Kconfig.debug: unhide CONFIG_PANIC_ON_OOPS
Kyle McMartin [Wed, 20 Feb 2013 02:15:10 +0000 (13:15 +1100)]
lib/Kconfig.debug: unhide CONFIG_PANIC_ON_OOPS

CONFIG_EXPERT doesn't really make sense, and hides it unintentionally.
Remove superfluous "default n" pointed out by Ingo as well.

Signed-off-by: Kyle McMartin <kyle@redhat.com>
Acked-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agosmp: make smp_call_function_many() use logic similar to smp_call_function_single()
Shaohua Li [Wed, 20 Feb 2013 02:15:10 +0000 (13:15 +1100)]
smp: make smp_call_function_many() use logic similar to smp_call_function_single()

I'm testing swapout workload in a two-socket Xeon machine.  The workload
has 10 threads, each thread sequentially accesses separate memory region.
TLB flush overhead is very big in the workload.  For each page, page
reclaim need move it from active lru list and then unmap it.  Both need a
TLB flush.  And this is a multthread workload, TLB flush happens in 10
CPUs.  In X86, TLB flush uses generic smp_call)function.  So this workload
stress smp_call_function_many heavily.

Without patch, perf shows:
+  24.49%  [k] generic_smp_call_function_interrupt
-  21.72%  [k] _raw_spin_lock
   - _raw_spin_lock
      + 79.80% __page_check_address
      + 6.42% generic_smp_call_function_interrupt
      + 3.31% get_swap_page
      + 2.37% free_pcppages_bulk
      + 1.75% handle_pte_fault
      + 1.54% put_super
      + 1.41% grab_super_passive
      + 1.36% __swap_duplicate
      + 0.68% blk_flush_plug_list
      + 0.62% swap_info_get
+   6.55%  [k] flush_tlb_func
+   6.46%  [k] smp_call_function_many
+   5.09%  [k] call_function_interrupt
+   4.75%  [k] default_send_IPI_mask_sequence_phys
+   2.18%  [k] find_next_bit

swapout throughput is around 1300M/s.

With the patch, perf shows:
-  27.23%  [k] _raw_spin_lock
   - _raw_spin_lock
      + 80.53% __page_check_address
      + 8.39% generic_smp_call_function_single_interrupt
      + 2.44% get_swap_page
      + 1.76% free_pcppages_bulk
      + 1.40% handle_pte_fault
      + 1.15% __swap_duplicate
      + 1.05% put_super
      + 0.98% grab_super_passive
      + 0.86% blk_flush_plug_list
      + 0.57% swap_info_get
+   8.25%  [k] default_send_IPI_mask_sequence_phys
+   7.55%  [k] call_function_interrupt
+   7.47%  [k] smp_call_function_many
+   7.25%  [k] flush_tlb_func
+   3.81%  [k] _raw_spin_lock_irqsave
+   3.78%  [k] generic_smp_call_function_single_interrupt

swapout throughput is around 1400M/s.  So there is around a 7%
improvement, and total cpu utilization doesn't change.

Without the patch, cfd_data is shared by all CPUs.
generic_smp_call_function_interrupt does read/write cfd_data several times
which will create a lot of cache ping-pong.  With the patch, the data
becomes per-cpu.  The ping-pong is avoided.  And from the perf data, this
doesn't make call_single_queue lock contend.

Next step is to remove generic_smp_call_function_interrupt() from arch
code.

Signed-off-by: Shaohua Li <shli@fusionio.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agoscripts-pnmtologo-fix-for-plain-pbm-checkpatch-fixes
Andrew Morton [Wed, 20 Feb 2013 02:15:09 +0000 (13:15 +1100)]
scripts-pnmtologo-fix-for-plain-pbm-checkpatch-fixes

ERROR: do not initialise statics to 0 or NULL
#24: FILE: scripts/pnmtologo.c:77:
+static int is_plain_pbm = 0;

WARNING: line over 80 characters
#33: FILE: scripts/pnmtologo.c:108:
+  * between the digits. This is Ok cause we know a PBM can only have a '1'

total: 1 errors, 1 warnings, 25 lines checked

./patches/scripts-pnmtologo-fix-for-plain-pbm.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Andreas Bießmann <andreas@biessmann.de>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agomm: use vm_unmapped_area() on alpha architecture
Michel Lespinasse [Wed, 20 Feb 2013 02:15:09 +0000 (13:15 +1100)]
mm: use vm_unmapped_area() on alpha architecture

Update the alpha arch_get_unmapped_area function to make use of
vm_unmapped_area() instead of implementing a brute force search.

Signed-off-by: Michel Lespinasse <walken@google.com>
Acked-by: Rik van Riel <riel@redhat.com>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Matt Turner <mattst88@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agoubifs: wait for page writeback to provide stable pages
Jan Kara [Wed, 20 Feb 2013 02:15:09 +0000 (13:15 +1100)]
ubifs: wait for page writeback to provide stable pages

When stable pages are required, we have to wait if the page is just going
to disk and we want to modify it.  Add proper callback to
ubifs_vm_page_mkwrite().

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Cc: Artem Bityutskiy <dedekind1@gmail.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Steven Whitehouse <swhiteho@redhat.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Eric Van Hensbergen <ericvh@gmail.com>
Cc: Ron Minnich <rminnich@sandia.gov>
Cc: Latchesar Ionkov <lucho@ionkov.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agoocfs2: wait for page writeback to provide stable pages
Jan Kara [Wed, 20 Feb 2013 02:15:08 +0000 (13:15 +1100)]
ocfs2: wait for page writeback to provide stable pages

When stable pages are required, we have to wait if the page is just going
to disk and we want to modify it.  Add proper callback to
ocfs2_grab_pages_for_write().

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Acked-by: Joel Becker <jlbec@evilplan.org>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Artem Bityutskiy <dedekind1@gmail.com>
Cc: Steven Whitehouse <swhiteho@redhat.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Eric Van Hensbergen <ericvh@gmail.com>
Cc: Ron Minnich <rminnich@sandia.gov>
Cc: Latchesar Ionkov <lucho@ionkov.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>