aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/hung_task.c (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2013-11-13init: make init failures more explicitMichael Opdenacker1-10/+29
This patch proposes to make init failures more explicit. Before this, the "No init found" message didn't help much. It could sometimes be misleading and actually mean "No *working* init found". This message could hide many different issues: - no init program candidates found at all - some init program candidates exist but can't be executed (missing execute permissions, failed to load shared libraries, executable compiled for an unknown architecture...) This patch notifies the kernel user when a candidate init program is found but can't be executed. In each failure situation, the error code is displayed, to quickly find the root cause. "No init found" is also replaced by "No working init found", which is more correct. This will help embedded Linux developers (especially the newcomers), regularly making and debugging new root filesystems. Credits to Geert Uytterhoeven and Janne Karhunen for their improvement suggestions. Signed-off-by: Michael Opdenacker <michael.opdenacker@free-electrons.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Tested-by: Janne Karhunen <Janne.Karhunen@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13init/do_mounts_rd.c: fix NULL pointer dereference while loading initramfsP J P1-0/+7
Make menuconfig allows one to choose compression format of an initial ramdisk image. But this choice does not result in duly compressed initial ramdisk image. Because - $ make install - does not pass on the selected compression choice to the dracut(8) tool, which creates the initramfs file. dracut(8) generates the image with the default compression, ie. gzip(1). If a user chose any other compression instead of gzip(1), it leads to a crash due to NULL pointer dereference in crd_load(), caused by a NULL function pointer returned by the 'decompress_method()' routine. Because the initramfs image is gzip(1) compressed, whereas the kernel knows only to decompress the chosen format and not gzip(1). This patch replaces the crash by an explicit panic() call with an appropriate error message. This shall prevent the kernel from eventually panicking in: init/do_mounts.c: mount_block_root() with -> panic("VFS: Unable to mount root fs on %s", b); [akpm@linux-foundation.org: mention that the problem is with the ramdisk, don't print known-to-be-NULL value] Signed-off-by: P J P <prasad@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13init.h: document the existence of __initconstGeert Uytterhoeven1-4/+2
Initdata can be const since more than 5 years, using the __initconst keyword. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13epoll: do not take global 'epmutex' for simple topologiesJason Baron1-26/+69
When calling EPOLL_CTL_ADD for an epoll file descriptor that is attached directly to a wakeup source, we do not need to take the global 'epmutex', unless the epoll file descriptor is nested. The purpose of taking the 'epmutex' on add is to prevent complex topologies such as loops and deep wakeup paths from forming in parallel through multiple EPOLL_CTL_ADD operations. However, for the simple case of an epoll file descriptor attached directly to a wakeup source (with no nesting), we do not need to hold the 'epmutex'. This patch along with 'epoll: optimize EPOLL_CTL_DEL using rcu' improves scalability on larger systems. Quoting Nathan Zimmer's mail on SPECjbb performance: "On the 16 socket run the performance went from 35k jOPS to 125k jOPS. In addition the benchmark when from scaling well on 10 sockets to scaling well on just over 40 sockets. ... Currently the benchmark stops scaling at around 40-44 sockets but it seems like I found a second unrelated bottleneck." [akpm@linux-foundation.org: use `bool' for boolean variables, remove unneeded/undesirable cast of void*, add missed ep_scan_ready_list() kerneldoc] Signed-off-by: Jason Baron <jbaron@akamai.com> Tested-by: Nathan Zimmer <nzimmer@sgi.com> Cc: Eric Wong <normalperson@yhbt.net> Cc: Nelson Elhage <nelhage@nelhage.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Davide Libenzi <davidel@xmailserver.org> Cc: "Paul E. McKenney" <paulmck@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13epoll: optimize EPOLL_CTL_DEL using rcuJason Baron1-24/+32
Nathan Zimmer found that once we get over 10+ cpus, the scalability of SPECjbb falls over due to the contention on the global 'epmutex', which is taken in on EPOLL_CTL_ADD and EPOLL_CTL_DEL operations. Patch #1 removes the 'epmutex' lock completely from the EPOLL_CTL_DEL path by using rcu to guard against any concurrent traversals. Patch #2 remove the 'epmutex' lock from EPOLL_CTL_ADD operations for simple topologies. IE when adding a link from an epoll file descriptor to a wakeup source, where the epoll file descriptor is not nested. This patch (of 2): Optimize EPOLL_CTL_DEL such that it does not require the 'epmutex' by converting the file->f_ep_links list into an rcu one. In this way, we can traverse the epoll network on the add path in parallel with deletes. Since deletes can't create loops or worse wakeup paths, this is safe. This patch in combination with the patch "epoll: Do not take global 'epmutex' for simple topologies", shows a dramatic performance improvement in scalability for SPECjbb. Signed-off-by: Jason Baron <jbaron@akamai.com> Tested-by: Nathan Zimmer <nzimmer@sgi.com> Cc: Eric Wong <normalperson@yhbt.net> Cc: Nelson Elhage <nelhage@nelhage.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Davide Libenzi <davidel@xmailserver.org> Cc: "Paul E. McKenney" <paulmck@us.ibm.com> CC: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13checkpatch: add check for sscanf without return useJoe Perches1-0/+17
Naked use sscanf can be troublesome because the pointed to variables may not have been set. Add a warning when the sscanf return value is not used. For now, do not add __must_check to the sscanf prototype because that will cause a couple of hundred new warnings when compiling a kernel. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13checkpatch: don't require kernel style __attribute__ shortcuts in uapi pathsJoe Perches1-7/+12
Avoid prescribing kernel styled shortcuts for gcc extensions of __attribute__((foo)) in the uapi include paths. Fix $realfile filename when using -f/--file to not remove first level directory as if the filename was used in a -P1 patch. Only strip the first level directory (typically a or b) for P1 patches. Signed-off-by: Joe Perches <joe@perches.com> Cc: "Dixit, Ashutosh" <ashutosh.dixit@intel.com> Cc: Andy Whitcroft <apw@canonical.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13checkpatch: improve "return is not a function" testJoe Perches1-14/+4
Find a few more cases where parentheses are used around the value of a return statement. This now uses the "$balanced_parens" test and also makes the test depend on perl v5.10 and higher. This now finds return with parenthesis uses the old code did not find like: ERROR: return is not a function, parentheses are not required #211: FILE: arch/m68k/include/asm/sun3xflop.h:211: + return ((error == 0) ? 0 : -1); Signed-off-by: Joe Perches <joe@perches.com> Tested-by: David Cohen <david.a.cohen@linux.intel.com> Acked-by: David Cohen <david.a.cohen@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13checkpatch.pl: check for the FSF mailing addressJosh Triplett1-0/+12
Kernel maintainers reject new instances of the GPL boilerplate paragraph directing people to write to the FSF for a copy of the GPL, since the FSF has moved in the past and may do so again. Make this an error for new code, but just a --strict CHK in --file mode; anyone interested in doing tree-wide cleanups of this form can enable this test explicitly. Signed-off-by: Josh Triplett <josh@joshtriplett.org> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13checkpatch: make the memory barrier test noisierJoe Perches1-2/+2
Peter Zijlstra prefers that comments be required near uses of memory barriers. Change the message level for memory barrier uses from a --strict test only to a normal WARN so it's always emitted. This might produce false positives around insertions of memory barriers when a comment is outside the patch context block. And checkpatch is still stupid, it only looks for existence of any comment, not at the comment content. Signed-off-by: Joe Perches <joe@perches.com> Suggested-by: Peter Zijlstra <peterz@infradead.org> Acked-by: Peter Zijlstra <peterz@infradead.org> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Oliver Neukum <oliver@neukum.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13checkpatch: add rules to check init attribute and const defectsJoe Perches1-2/+34
People get this regularly wrong and it breaks the LTO builds, as it causes a section attribute conflict. Add --fix capability too. Based on a patch from Andi Kleen. Signed-off-by: Joe Perches <joe@perches.com> Cc: Andi Kleen <ak@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13checkpatch: add test for #defines of ARCH_HAS_<foo>Joe Perches1-8/+14
Add a test for these #defines Additionally, moved string_find_replace sub as it screws up subsequent formatting when placed inside another sub. Signed-off-by: Joe Perches <joe@perches.com> Suggested-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13checkpatch: find CamelCase definitions of struct/union/enumJoe Perches1-2/+3
Checkpatch doesn't currently find CamelCase definitions of structs, unions or enums. Add that ability. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13checkpatch: update seq_<foo> testsJoe Perches1-3/+4
seq_vprintf, seq_printf and seq_puts are logging functions and should be allowed to exceed the maximium line length. Add maximum line length exceptions for these functions. Also, suggesting seq_printf conversions to seq_puts should be tested for arguments after the format. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13checkpatch: extend CamelCase types and ignore existing CamelCase uses in a patchJoe Perches1-2/+10
Extend the CamelCase words found to include structure members. In https://lkml.org/lkml/2013/9/3/318 Sarah Sharp (mostly) wrote: "In general, if checkpatch.pl complains about a variable a patch introduces that's CamelCase, you should pay attention to it. Otherwise, [] ignore it." So, if checking a patch, scan the original patched file if it's available and add any preexisting CamelCase types so reuses do not generate CamelCase messages. That also means Andrew's not so cruelly spurned anymore. https://lkml.org/lkml/2013/2/22/426 Signed-off-by: Joe Perches <joe@perches.com> Suggested-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Suggested-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13checkpatch: report missing spaces around trigraphs with --strictJoe Perches1-9/+7
Spaces around trigraphs are specified by CodingStyle but checkpatch is currently silent about them because there are many current instances without them. Make missing spaces around trigraphs a --strict message. Signed-off-by: Joe Perches <joe@perches.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13debugfs: use list_next_entry() in debugfs_remove_recursive()Oleg Nesterov1-2/+1
Change debugfs_remove_recursive() to use list_next_entry(child), no changes in generated code. Signed-off-by: Oleg Nesterov <oleg@redhat.com> Cc: Eilon Greenstein <eilong@broadcom.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13list: introduce list_last_entry(), use list_{first,last}_entry()Oleg Nesterov1-4/+15
We already have list_first_entry(), it makes sense to also add list_last_entry() for consistency. And we use both helpers in list_for_each_*(). Signed-off-by: Oleg Nesterov <oleg@redhat.com> Cc: Eilon Greenstein <eilong@broadcom.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13list: change list_for_each_entry*() to use list_*_entry()Oleg Nesterov1-22/+22
Now that we have list_{next,prev}_entry() we can change list_for_each_entry*() and list_safe_reset_next() to use the new helpers to improve the readability. Signed-off-by: Oleg Nesterov <oleg@redhat.com> Cc: Eilon Greenstein <eilong@broadcom.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13list: introduce list_next_entry() and list_prev_entry()Oleg Nesterov3-6/+16
Add two trivial helpers list_next_entry() and list_prev_entry(), they can have a lot of users including list.h itself. In fact the 1st one is already defined in events/core.c and bnx2x_sp.c, so the patch simply moves the definition to list.h. Signed-off-by: Oleg Nesterov <oleg@redhat.com> Cc: Eilon Greenstein <eilong@broadcom.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13sound/soc/pxa/mmp-pcm.c: use gen_pool_dma_alloc() to allocate dma bufferNicolin Chen1-2/+1
Since gen_pool_dma_alloc() is introduced, we implement it to simplify code. Signed-off-by: Nicolin Chen <b42378@freescale.com> Cc: Eric Miao <eric.y.miao@gmail.com> Cc: Russell King <linux@arm.linux.org.uk> Cc: Haojian Zhuang <haojian.zhuang@gmail.com> Cc: Liam Girdwood <lgirdwood@gmail.com> Cc: Mark Brown <broonie@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13sound/soc/davinci/davinci-pcm.c: use gen_pool_dma_alloc() in davinci-pcm.cNicolin Chen1-2/+1
Since gen_pool_dma_alloc() is introduced, we implement it to simplify code. Signed-off-by: Nicolin Chen <b42378@freescale.com> Cc: Liam Girdwood <lgirdwood@gmail.com> Cc: Mark Brown <broonie@kernel.org> Cc: Jaroslav Kysela <perex@perex.cz> Cc: Takashi Iwai <tiwai@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13drivers/uio/uio_pruss.c: use gen_pool_dma_alloc() to allocate sram memoryNicolin Chen1-4/+2
Since gen_pool_dma_alloc() is introduced, we implement it to simplify code. Signed-off-by: Nicolin Chen <b42378@freescale.com> Cc: "Hans J. Koch" <hjk@hansjkoch.de> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13drivers/media/platform/coda.c: use gen_pool_dma_alloc() to allocate iram bufferNicolin Chen1-3/+2
Since gen_pool_dma_alloc() is introduced, we implement it to simplify code. Signed-off-by: Nicolin Chen <b42378@freescale.com> Acked-by: Mauro Carvalho Chehab <m.chehab@samsung.com> Cc: Grant Likely <grant.likely@linaro.org> Cc: Rob Herring <rob.herring@calxeda.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13drivers/dma/mmp_tdma.c: use gen_pool_dma_alloc() to allocate descriptorNicolin Chen1-6/+1
Since gen_pool_dma_alloc() is introduced, we implement it to simplify code. Signed-off-by: Nicolin Chen <b42378@freescale.com> Cc: Dan Williams <dan.j.williams@intel.com> Cc: Vinod Koul <vinod.koul@intel.com> Cc: Grant Likely <grant.likely@linaro.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13arch/arm/mach-davinci/sram.c: use gen_pool_dma_alloc() to sram.cNicolin Chen1-8/+1
Since gen_pool_dma_alloc() is introduced, we implement it to simplify code. Signed-off-by: Nicolin Chen <b42378@freescale.com> Cc: Sekhar Nori <nsekhar@ti.com> Cc: Kevin Hilman <khilman@deeprootsystems.com> Cc: Russell King <linux@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13lib/genalloc: add a helper function for DMA buffer allocationNicolin Chen2-0/+30
When using pool space for DMA buffer, there might be duplicated calling of gen_pool_alloc() and gen_pool_virt_to_phys() in each implementation. Thus it's better to add a simple helper function, a compatible one to the common dma_alloc_coherent(), to save some code. Signed-off-by: Nicolin Chen <b42378@freescale.com> Cc: "Hans J. Koch" <hjk@hansjkoch.de> Cc: Dan Williams <dan.j.williams@intel.com> Cc: Eric Miao <eric.y.miao@gmail.com> Cc: Grant Likely <grant.likely@linaro.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Haojian Zhuang <haojian.zhuang@gmail.com> Cc: Jaroslav Kysela <perex@perex.cz> Cc: Kevin Hilman <khilman@deeprootsystems.com> Cc: Liam Girdwood <lgirdwood@gmail.com> Cc: Mark Brown <broonie@kernel.org> Cc: Mauro Carvalho Chehab <m.chehab@samsung.com> Cc: Rob Herring <rob.herring@calxeda.com> Cc: Russell King <linux@arm.linux.org.uk> Cc: Sekhar Nori <nsekhar@ti.com> Cc: Takashi Iwai <tiwai@suse.de> Cc: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13lib/digsig.c: use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...))Duan Jiong1-1/+1
Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com> Cc: James Morris <james.l.morris@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13lib/vsprintf.c: document formats for dentry and struct fileOlof Johansson1-0/+2
Looks like these were added to Documentation/printk-formats.txt but not the in-file table. Signed-off-by: Olof Johansson <olof@lixom.net> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13lib/debugobjects.c: remove unnecessary work pending testXie XiuQi1-1/+1
Remove unnecessary work pending test before calling schedule_work(). It has been tested in queue_work_on() already. No functional changed. Signed-off-by: Xie XiuQi <xiexiuqi@huawei.com> Reviewed-by: Tejun Heo <tj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13bitops/find: clarify and extend documentationCody P Schafer1-2/+10
Add return value documentation and clarify the units of the @size parameter. Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Cody P Schafer <cody@linux.vnet.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13drivers/video/backlight/hx8357.c: remove redundant of_match_ptrSachin Kamat1-1/+1
'hx8357_dt_ids' is always compiled in. Hence of_match_ptr is not needed. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Acked-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13backlight: atmel-pwm-bl: use gpio_request_oneJohan Hovold1-7/+8
Use devm_gpio_request_one rather than requesting and setting direction in two calls. Signed-off-by: Johan Hovold <jhovold@gmail.com> Cc: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13backlight: atmel-pwm-bl: refactor gpio_on handlingJohan Hovold1-12/+11
Add helper function to control the gpio_on signal. Signed-off-by: Johan Hovold <jhovold@gmail.com> Acked-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13backlight: atmel-pwm-bl: use gpio_is_validJohan Hovold1-4/+4
Use gpio_is_valid rather than open coding the more restrictive != -1 test. Signed-off-by: Johan Hovold <jhovold@gmail.com> Acked-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13backlight: atmel-pwm-bl: remove unused includeJohan Hovold1-1/+0
Remove unused include of clk.h. Signed-off-by: Johan Hovold <jhovold@gmail.com> Acked-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13backlight: atmel-pwm-bl: clean up get_intensityJohan Hovold1-7/+6
Clean up get_intensity to increase readability. Signed-off-by: Johan Hovold <jhovold@gmail.com> Acked-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13backlight: atmel-pwm-bl: clean up probe error handlingJohan Hovold1-19/+12
Clean up probe error handling by checking parameters before any allocations and removing an obsolete error label. Also remove unnecessary reset of private gpio number. Signed-off-by: Johan Hovold <jhovold@gmail.com> Acked-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13backlight: atmel-pwm-bl: fix module autoloadJohan Hovold1-0/+1
Add missing module alias which is needed for module autoloading. Signed-off-by: Johan Hovold <jhovold@gmail.com> Acked-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13backlight: atmel-pwm-bl: fix gpio polarity in removeJohan Hovold1-2/+4
Make sure to honour gpio polarity also at remove so that the backlight is actually disabled on boards with active-low enable pin. Signed-off-by: Johan Hovold <jhovold@gmail.com> Acked-by: Jingoo Han <jg1.han@samsung.com> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13backlight: atmel-pwm-bl: fix reported brightnessJohan Hovold1-2/+2
The driver supports 16-bit brightness values, but the value returned from get_brightness was truncated to eight bits. Signed-off-by: Johan Hovold <jhovold@gmail.com> Cc: Jingoo Han <jg1.han@samsung.com> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13drivers/video/backlight/lm3630a_bl.c: add missing destroy_workqueue() on error in lm3630a_intr_config()Wei Yongjun1-0/+1
Add the missing destroy_workqueue() before return from lm3630a_intr_config() in the error handling case. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13backlight: s6e63m0: use devm_{backlight,lcd}_device_register()Jingoo Han1-13/+7
Use devm_backlight_device_register() and devm_lcd_device_register() to make cleanup paths simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13backlight: cr_bllcd: use devm_{backlight,lcd}_device_register()Jingoo Han1-8/+5
Use devm_backlight_device_register() and devm_lcd_device_register() to make cleanup paths simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13backlight: corgi_lcd: use devm_{backlight,lcd}_device_register()Jingoo Han1-19/+9
Use devm_backlight_device_register() and devm_lcd_device_register() to make cleanup paths simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13backlight: ld9040: use devm_{backlight,lcd}_device_register()Jingoo Han1-15/+6
Use devm_backlight_device_register() and devm_lcd_device_register() to make cleanup paths simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13backlight: ams369fg06: use devm_{backlight,lcd}_device_register()Jingoo Han1-15/+7
Use devm_backlight_device_register() and devm_lcd_device_register() to make cleanup paths simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13backlight: tdo24m: use devm_lcd_device_register()Jingoo Han1-9/+3
Use devm_lcd_device_register() to make cleanup paths simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13backlight: platform_lcd: use devm_lcd_device_register()Jingoo Han1-17/+3
Use devm_lcd_device_register() to make cleanup paths simpler, and remove unnecessary remove(). Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13backlight: ltv350qv: use devm_lcd_device_register()Jingoo Han1-8/+3
Use devm_lcd_device_register() to make cleanup paths simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>