aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-12-17drivers/rtc/rtc-imxdi.c: add devicetree supportRoland Stigge2-0/+28
Add device tree support to the rtc-imxdi driver. Signed-off-by: Roland Stigge <[email protected]> Cc: Alessandro Zummo <[email protected]> Cc: Grant Likely <[email protected]> Cc: Sascha Hauer <[email protected]> Cc: Russell King <[email protected]> Cc: Shawn Guo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-12-17drivers/rtc/rtc-imxdi: support for i.MX53Roland Stigge1-1/+1
Enable support for i.MX53 in addition to i.MX25 by enabling the driver on ARCH_MXC generally. Signed-off-by: Roland Stigge <[email protected]> Cc: Alessandro Zummo <[email protected]> Cc: Grant Likely <[email protected]> Cc: Sascha Hauer <[email protected]> Cc: Russell King <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-12-17rtc: omap: add runtime pm supportVaibhav Hiremath1-0/+18
OMAP1 RTC driver is used in multiple devices like, OMAPL138 and AM33XX. Driver currently doesn't handle any clocks, which may be right for OMAP1 architecture but in case of AM33XX, the clock/module needs to be enabled in order to access the registers. So convert this driver to runtime pm, which internally handles rest. [[email protected]: handle error path] Signed-off-by: Vaibhav Hiremath <[email protected]> Signed-off-by: Afzal Mohammed <[email protected]> Acked-by: Sekhar Nori <[email protected]> Cc: Grant Likely <[email protected]> Cc: Sekhar Nori <[email protected]> Cc: Kevin Hilman <[email protected]> Cc: Russell King <[email protected]> Cc: Alessandro Zummo <[email protected]> Cc: Daniel Mack <[email protected]> Cc: Vaibhav Hiremath <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-12-17rtc: omap: depend on am33xxAfzal Mohammed1-4/+6
rtc-omap driver can be reused for AM33xx RTC. Provide dependency in Kconfig. Signed-off-by: Afzal Mohammed <[email protected]> Acked-by: Sekhar Nori <[email protected]> Cc: Grant Likely <[email protected]> Cc: Sekhar Nori <[email protected]> Cc: Kevin Hilman <[email protected]> Cc: Russell King <[email protected]> Cc: Alessandro Zummo <[email protected]> Cc: Daniel Mack <[email protected]> Cc: Vaibhav Hiremath <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-12-17rtc: omap: dt supportAfzal Mohammed2-0/+35
Enhance rtc-omap driver with DT capability Signed-off-by: Afzal Mohammed <[email protected]> Acked-by: Sekhar Nori <[email protected]> Cc: Grant Likely <[email protected]> Cc: Sekhar Nori <[email protected]> Cc: Kevin Hilman <[email protected]> Cc: Russell King <[email protected]> Cc: Alessandro Zummo <[email protected]> Cc: Daniel Mack <[email protected]> Cc: Vaibhav Hiremath <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-12-17ARM: davinci: remove rtc kicker releaseAfzal Mohammed1-12/+1
rtc-omap driver is now capable of handling kicker mechanism, hence remove kicker handling at platform level, instead provide proper device name so that driver can handle kicker mechanism by itself Signed-off-by: Afzal Mohammed <[email protected]> Acked-by: Sekhar Nori <[email protected]> Cc: Grant Likely <[email protected]> Cc: Sekhar Nori <[email protected]> Cc: Kevin Hilman <[email protected]> Cc: Russell King <[email protected]> Cc: Alessandro Zummo <[email protected]> Cc: Daniel Mack <[email protected]> Cc: Vaibhav Hiremath <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-12-17rtc: omap: kicker mechanism supportAfzal Mohammed1-3/+41
OMAP RTC IP can have kicker feature. This prevents spurious writes to register. To write to registers kicker lock has to be released. Procedure to do it as follows, 1. write to kick0 register, 0x83e70b13 2. write to kick1 register, 0x95a4f1e0 Writing value other than 0x83e70b13 to kick0 enables write locking, more details about kicker mechanism can be found in section 20.3.3.5.3 of AM335X TRM @www.ti.com/am335x Here id table information is added and is used to distinguish those that require kicker handling and the ones that doesn't need it. There are more features in the newer IP's compared to legacy ones other than kicker, which driver currently doesn't handle, supporting additional features would be easier with the addition of id table. Older IP (of OMAP1) doesn't have revision register as per TRM, so revision register can't be relied always to find features, hence id table is being used. While at it, replace __raw_writeb/__raw_readb with writeb/readb; this driver is used on ARMv7 (AM335X SoC) Signed-off-by: Afzal Mohammed <[email protected]> Acked-by: Sekhar Nori <[email protected]> Cc: Grant Likely <[email protected]> Cc: Sekhar Nori <[email protected]> Cc: Kevin Hilman <[email protected]> Cc: Russell King <[email protected]> Cc: Alessandro Zummo <[email protected]> Cc: Daniel Mack <[email protected]> Cc: Vaibhav Hiremath <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-12-17binfmt_elf: fix corner case kfree of uninitialized dataAlan Cox1-1/+3
If elf_core_dump() is called and fill_note_info() fails in the kmalloc() then it returns 0 but has not yet initialised all the needed fields. As a result we do a kfree(randomness) after correctly skipping the thread data. [[email protected]: checkpatch fixes] Signed-off-by: Alan Cox <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-12-17checkpatch: warn on CamelCase variable namesJoe Perches1-6/+13
Store the camelcase variables in a hash and only emit a warning on the first use of each new variable. Signed-off-by: Joe Perches <[email protected]> Cc: Andy Whitcroft <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-12-17checkpatch: add support for floating point constantsJoe Perches1-1/+5
Even though the kernel doesn't support using floating point constants, add a regex for them. Support forms like: 0x123p1, 123e-1, 1.23, 1.5e23f Signed-off-by: Joe Perches <[email protected]> Cc: Andy Whitcroft <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-12-17checkpatch: find hex constants as a single IDENTJoe Perches1-1/+1
Hexadecimal values are current found in 2 parts. A hex constant like 0x123456abcdef is found as 0 and then x123456abcdef and later coalesced. Instead, reverse the order of the 2 searches in $Constant to find 0x first, then 0 so that the entire hex constant is found all at once. Signed-off-by: Joe Perches <[email protected]> Cc: Andy Whitcroft <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-12-17checkpatch: add --strict test for switch/default missing breakJoe Perches1-2/+16
switch default case is sometimes written as "default:;". This can cause new cases added below the default to be defective. Suggest adding a break; after empty default cases to avoid fallthrough defects. Fixed indentation in the other semicolon test above it. Suggested-by: Peter Senna Tschudin <[email protected]> Signed-off-by: Joe Perches <[email protected]> Cc: Andy Whitcroft <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-12-17checkpatch: warn when declaring "struct spinlock foo;"Joe Perches1-0/+6
spinlock_t should always be used. Signed-off-by: Joe Perches <[email protected]> Acked-by: "Luis R. Rodriguez" <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-12-17checkpatch: Add --strict messages for blank lines around bracesJoe Perches1-0/+10
Blank lines around braces are not unnecessary. Emit a message on the use of these blank lines only when using --strict. int foo(int bar) { something or other.... } is generally written in the kernel as: int foo(int bar) { something or other... } Signed-off-by: Joe Perches <[email protected]> Cc: Andy Whitcroft <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-12-17checkpatch: extend line continuation testJoe Perches1-1/+3
Preprocessor directives and asm statements should be allowed to have a line continuation. Signed-off-by: Joe Perches <[email protected]> Tested-by: Jingoo Han <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-12-17checkpatch: allow control over line length warning, default remains 80Joe Perches1-3/+6
Some projects might want a longer line length so allow a command line --max-line-length=n control over the long line warnings. The default line length is 80. Signed-off-by: Joe Perches <[email protected]> Cc: Constantine Shulyupin <[email protected]> Cc: Andy Whitcroft <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-12-17checkpatch: consolidate if (foo) bar(foo) checks and add debugfs_removeAndy Whitcroft1-14/+6
Consolidate the if (foo) bar(foo) detectors into a single check. Add debugfs_remove and family. Based on a patch by Constantine Shulyupin. Signed-off-by: Andy Whitcroft <[email protected]> Cc: Constantine Shulyupin <[email protected]>. Cc: Joe Perches <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-12-17checkpatch: remove reference to feature-removal-schedule.txtTao Ma1-37/+0
In commit 9c0ece069b32 ("Get rid of Documentation/feature-removal.txt"), Linus removes feature-removal-schedule.txt from Documentation, but there is still some reference to this file. So remove them. Signed-off-by: Tao Ma <[email protected]> Acked-by: Andy Whitcroft <[email protected]> Cc: Joe Perches <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-12-17checkpatch: warn about using CONFIG_EXPERIMENTALKees Cook1-0/+13
This config item has not carried much meaning for a while now and is almost always enabled by default. As agreed during the Linux kernel summit, it is being removed. This will discourage future addition of CONFIG_EXPERIMENTAL while it is being phased out. Signed-off-by: Kees Cook <[email protected]> Cc: Andy Whitcroft <[email protected]> Cc: Joe Perches <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-12-17checkpatch: warn on unnecessary line continuationsJoe Perches1-0/+9
When the previous line is not a line continuation and the current line has a line continuation but is not a #define, emit a warning. Signed-off-by: Joe Perches <[email protected]> Cc: Peter Hurley <[email protected]> Cc: Andy Whitcroft <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-12-17compat: generic compat_sys_sched_rr_get_interval() implementationCatalin Marinas12-63/+29
This function is used by sparc, powerpc tile and arm64 for compat support. The patch adds a generic implementation with a wrapper for PowerPC to do the u32->int sign extension. The reason for a single patch covering powerpc, tile, sparc and arm64 is to keep it bisectable, otherwise kernel building may fail with mismatched function declarations. Signed-off-by: Catalin Marinas <[email protected]> Acked-by: Chris Metcalf <[email protected]> [for tile] Acked-by: David S. Miller <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Alexander Viro <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-12-17lib/rbtree_test.c: fix uninitialized variable warningCong Ding1-1/+1
Fix this warning: lib/rbtree_test.c: In function `check': lib/rbtree_test.c:121: warning: `blacks' may be used uninitialized in this function Signed-off-by: Cong Ding <[email protected]> Cc: Michel Lespinasse <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-12-17percpu_rw_semaphore: introduce CONFIG_PERCPU_RWSEMOleg Nesterov4-1/+7
Currently only block_dev and uprobes use percpu_rw_semaphore, add the config option selected by BLOCK || UPROBES. Signed-off-by: Oleg Nesterov <[email protected]> Cc: Anton Arapov <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Michal Marek <[email protected]> Cc: Mikulas Patocka <[email protected]> Cc: "Paul E. McKenney" <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Srikar Dronamraju <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-12-17percpu_rw_semaphore: add lockdep annotationsOleg Nesterov2-5/+26
Add lockdep annotations. Not only this can help to find the potential problems, we do not want the false warnings if, say, the task takes two different percpu_rw_semaphore's for reading. IOW, at least ->rw_sem should not use a single class. This patch exposes this internal lock to lockdep so that it represents the whole percpu_rw_semaphore. This way we do not need to add another "fake" ->lockdep_map and lock_class_key. More importantly, this also makes the output from lockdep much more understandable if it finds the problem. In short, with this patch from lockdep pov percpu_down_read() and percpu_up_read() acquire/release ->rw_sem for reading, this matches the actual semantics. This abuses __up_read() but I hope this is fine and in fact I'd like to have down_read_no_lockdep() as well, percpu_down_read_recursive_readers() will need it. Signed-off-by: Oleg Nesterov <[email protected]> Cc: Anton Arapov <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Michal Marek <[email protected]> Cc: Mikulas Patocka <[email protected]> Cc: "Paul E. McKenney" <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Srikar Dronamraju <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-12-17percpu_rw_semaphore: kill ->writer_mutex, add ->write_ctrOleg Nesterov2-20/+18
percpu_rw_semaphore->writer_mutex was only added to simplify the initial rewrite, the only thing it protects is clear_fast_ctr() which otherwise could be called by multiple writers. ->rw_sem is enough to serialize the writers. Kill this mutex and add "atomic_t write_ctr" instead. The writers increment/decrement this counter, the readers check it is zero instead of mutex_is_locked(). Move atomic_add(clear_fast_ctr(), slow_read_ctr) under down_write() to avoid the race with other writers. This is a bit sub-optimal, only the first writer needs this and we do not need to exclude the readers at this stage. But this is simple, we do not want another internal lock until we add more features. And this speeds up the write-contended case. Before this patch the racing writers sleep in synchronize_sched_expedited() sequentially, with this patch multiple synchronize_sched_expedited's can "overlap" with each other. Note: we can do more optimizations, this is only the first step. Signed-off-by: Oleg Nesterov <[email protected]> Cc: Anton Arapov <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Michal Marek <[email protected]> Cc: Mikulas Patocka <[email protected]> Cc: "Paul E. McKenney" <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Srikar Dronamraju <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-12-17percpu_rw_semaphore: reimplement to not block the readers unnecessarilyOleg Nesterov3-71/+168
Currently the writer does msleep() plus synchronize_sched() 3 times to acquire/release the semaphore, and during this time the readers are blocked completely. Even if the "write" section was not actually started or if it was already finished. With this patch down_write/up_write does synchronize_sched() twice and down_read/up_read are still possible during this time, just they use the slow path. percpu_down_write() first forces the readers to use rw_semaphore and increment the "slow" counter to take the lock for reading, then it takes that rw_semaphore for writing and blocks the readers. Also. With this patch the code relies on the documented behaviour of synchronize_sched(), it doesn't try to pair synchronize_sched() with barrier. Signed-off-by: Oleg Nesterov <[email protected]> Reviewed-by: Paul E. McKenney <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Mikulas Patocka <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Srikar Dronamraju <[email protected]> Cc: Ananth N Mavinakayanahalli <[email protected]> Cc: Anton Arapov <[email protected]> Cc: Jens Axboe <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-12-17sscanf: don't ignore field widths for numeric conversionsJan Beulich1-43/+53
This is another step towards better standard conformance. Rather than adding a local buffer to store the specified portion of the string (with the need to enforce an arbitrary maximum supported width to limit the buffer size), do a maximum width conversion and then drop as much of it as is necessary to meet the caller's request. Also fail on negative field widths. Uses the deprecated simple_strto*() functions because kstrtoXX() fail on non-zero terminated strings. Signed-off-by: Jan Beulich <[email protected]> Cc: Alexey Dobriyan <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-12-17drivers/of/fdt.c: re-use kernel's kbasename()Andy Shevchenko1-8/+2
Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Grant Likely <[email protected]> Cc: Rob Herring <[email protected]> Cc: Fabio Estevam <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-12-17trace: use kbasename()Andy Shevchenko1-4/+4
Signed-off-by: Andy Shevchenko <[email protected]> Cc: Steven Rostedt <[email protected]> Cc: Frederic Weisbecker <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-12-17procfs: use kbasename()Andy Shevchenko1-5/+1
[[email protected]: remove duplicated include] Signed-off-by: Andy Shevchenko <[email protected]> Signed-off-by: Wei Yongjun <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-12-17mm: use kbasename()Andy Shevchenko1-5/+3
Signed-off-by: Andy Shevchenko <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-12-17lib: dynamic_debug: use kbasename()Andy Shevchenko1-8/+1
Remove the custom implementation of the functionality similar to kbasename(). Signed-off-by: Andy Shevchenko <[email protected]> Cc: Jason Baron <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-12-17string: introduce helper to get base file name from given pathAndy Shevchenko1-0/+11
There are several places in the kernel that use functionality like basename(3) with the exception: in case of '/foo/bar/' we expect to get an empty string. Let's do it common helper for them. Signed-off-by: Andy Shevchenko <[email protected]> Cc: Jason Baron <[email protected]> Cc: YAMANE Toshiaki <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Steven Rostedt <[email protected]> Cc: Frederic Weisbecker <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-12-17MAINTAINERS: add LP855x backlight driver entryKim, Milo1-0/+7
Signed-off-by: Milo(Woogyom) Kim <[email protected]> Cc: Richard Purdie <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-12-17backlight: corgi_lcd: Use gpio_set_value_cansleep() to avoid WARN_ONMarko Katic1-2/+2
Changing backlight intensity on an Akita (Sharp Zaurus C-1000) triggers WARN_ON message: WARNING: at drivers/gpio/gpiolib.c:1672 __gpio_set_value+0x38/0xa4() Modules linked in: Backtrace: corgi_bl_set_intensity+0x0/0x74 corgi_bl_update_status+0x0/0x64 corgi_lcd_probe+0x0/0x258 spi_drv_probe+0x0/0x24 driver_probe_device+0x0/0x208 __driver_attach+0x0/0x94 bus_for_each_dev+0x0/0x90 driver_attach+0x0/0x28 bus_add_driver+0x0/0x22c driver_register+0x0/0x134 spi_register_driver+0x0/0x60 corgi_lcd_driver_init+0x0/0x1c do_one_initcall+0x0/0x174 kernel_init+0x0/0x2a8 Akita machines have backlight controls hooked to a gpio expander chip, max7310 using i2c transfers which can sleep. In this case, pca953x_gpio_set_value() can be called to control gpio, and pca953x_setup_gpio() sets can_sleep flag. Therefore, gpio_set_value_cansleep() should be used in order to avoid WARN_ON on akita machines. Akita is the only exception in this case since other users of corgi_lcd access backlight gpio controls through a different gpio expander which does not set the can_sleep flag. Signed-off-by: Marko Katic <[email protected]> Signed-off-by: Jingoo Han <[email protected]> Cc: Russell King <[email protected]> Cc: Grant Likely <[email protected]> Cc: Florian Tobias Schandinat <[email protected]> Cc: Richard Purdie <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-12-17drivers/video/backlight/lms283gf05.c: use GPIOF_INIT flags when using ↵Jingoo Han1-1/+2
devm_gpio_request_one() GPIOF_DIR_OUT and GPIOF_DIR_IN are defined as below: GPIOF_DIR_OUT (0 << 0) GPIOF_DIR_IN (1 << 0) So, when !pdata->reset_inverted is 1, the gpio pin can be set as input, instead of output. To prevent this problem, GPIOF_INIT flag should be used when using devm_gpio_request_one(). Signed-off-by: Jingoo Han <[email protected]> Cc: Marek Vasut <[email protected]> Cc: Richard Purdie <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-12-17drivers/video/backlight/lcd.c: return ENXIO when ops functions cannot be calledJingoo Han1-2/+6
Previously, when ops functions cannot be called, lcd_show_contrast() and lcd_store_contrast() returned 0, instead of ENXIO. Thus, in this case, a local variable 'rc' for return value should be initialized as ENXIO, after kstrtoul() is called. Signed-off-by: Jingoo Han <[email protected]> Cc: Richard Purdie <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-12-17backlight: 88pm860x_bl: remove an unnecessary line continuationJingoo Han1-2/+1
Remove an unnecessary line continuation in pm860x_backlight_probe(). Also, a checkpatch warning is fixed as below: WARNING: Avoid unnecessary line continuations [[email protected]: remove newline] Signed-off-by: Jingoo Han <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-12-17drivers/video/backlight/pandora_bl.c: change TWL4030_MODULE_PWM0 to ↵Peter Ujfalusi1-5/+3
TWL_MODULE_PWM TWL_MODULE_PWM is defined as: #define TWL_MODULE_PWM TWL4030_MODULE_PWM0 Use the common module ID define here which will facilitate the upcoming twl-core cleanup. Signed-off-by: Peter Ujfalusi <[email protected]> Acked-by: Jingoo Han <[email protected]> Cc: Richard Purdie <[email protected]> Cc: Florian Tobias Schandinat <[email protected]> Cc: Grazvydas Ignotas <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-12-17backlight: add of_find_backlight_by_node()Thierry Reding2-0/+39
This function finds the struct backlight_device for a given device tree node. A dummy function is provided so that it safely compiles out if OF support is disabled. [[email protected]: Don't use IS_ENABLED(CONFIG_OF)] Signed-off-by: Thierry Reding <[email protected]> Acked-by: Jingoo Han <[email protected]> Reviewed-by: Grant Likely <[email protected]> Cc: Thierry Reding <[email protected]> Reviewed-by: Grant Likely <[email protected]> Acked-by: Jingoo Han <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-12-17drivers/video/backlight/lm3639_bl.c: fix up world writable sysfs fileAxel Lin1-1/+1
We don't need the sysfs file to be world writable or group writable. This file is write-only, change it to S_IWUSR (0200). Signed-off-by: Axel Lin <[email protected]> Acked-by: "G.Shark Jeong" <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-12-17drivers/video/backlight/max8925_bl.c: drop devm_kfree of devm_kzalloc'd dataJingoo Han1-8/+3
devm_kfree() allocates memory that is released when a driver detaches. Thus, there is no reason to explicitly call devm_kfree in probe or remove functions. Signed-off-by: Jingoo Han <[email protected]> Cc: Richard Purdie <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-12-17drivers/video/backlight/88pm860x_bl.c: drop devm_kfree of devm_kzalloc'd dataJingoo Han1-8/+3
devm_kfree() allocates memory that is released when a driver detaches. Thus, there is no reason to explicitly call devm_kfree() in probe or remove functions. Signed-off-by: Jingoo Han <[email protected]> Cc: Richard Purdie <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-12-17drivers/video/backlight/s6e63m0.c: remove unnecessary cast of void pointerJingoo Han1-1/+1
Remove unnecessary cast of void pointer for platform data in probe function. Signed-off-by: Jingoo Han <[email protected]> Cc: Richard Purdie <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-12-17drivers/video/backlight/vgg2432a4.c: add missing constJingoo Han3-6/+6
Add 'const' to static array that was missing it in its definition. Also, 'const' is added to ili9320_write_regs(), because it is called by vgg2432a4 driver. Signed-off-by: Jingoo Han <[email protected]> Cc: Ben Dooks <[email protected]> Cc: Richard Purdie <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-12-17drivers/video/backlight/tdo24m.c: add missing constJingoo Han1-13/+14
Add 'const' to static array that was missing it in its definition. Signed-off-by: Jingoo Han <[email protected]> Cc: Eric Miao <[email protected]> Cc: Richard Purdie <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-12-17drivers/video/backlight/lms283gf05.c: add missing constJingoo Han1-3/+3
Add 'const' to static array that was missing it in its definition. Signed-off-by: Jingoo Han <[email protected]> Acked-by: Marek Vasut <[email protected]> Cc: Richard Purdie <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-12-17drivers/video/backlight/da9052_bl.c: add missing constJingoo Han1-1/+1
Add 'const' to static array that was missing it in its definition. Signed-off-by: Jingoo Han <[email protected]> Cc: Ashish Jangam <[email protected]> Cc: Richard Purdie <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-12-17drivers/video/backlight/lp855x_bl.c: remove unnecessary mutex codeKim, Milo1-13/+1
The mutex for accessing lp855x registers is used in case of the user-space interaction. When the brightness is changed via sysfs, the mutex is required. But the backlight class device already provides it. Thus, the lp855x mutex is unnecessary. Signed-off-by: Milo(Woogyom) Kim <[email protected]> Cc: Thierry Reding <[email protected]> Cc: Richard Purdie <[email protected]> Cc: Bryan Wu <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-12-17drivers/video/backlight/lp855x_bl.c: use generic PWM functionsKim, Milo3-26/+30
The LP855x family devices support the PWM input for the backlight control. Period of the PWM is configurable in the platform side. Platform specific functions are unnecessary anymore because generic PWM functions are used inside the driver. (PWM input mode) To set the brightness, new lp855x_pwm_ctrl() is used. If a PWM device is not allocated, devm_pwm_get() is called. The PWM consumer name is from the chip name such as 'lp8550' and 'lp8556'. To get the brightness value, no additional handling is required. Just the value of 'props.brightness' is returned. If the PWM driver is not ready while initializing the LP855x driver, it's OK. The PWM device can be retrieved later, when the brightness value is changed. Documentation is updated with an example. [[email protected]: coding-style simplification, per Thierry] Signed-off-by: Milo(Woogyom) Kim <[email protected]> Cc: Thierry Reding <[email protected]> Cc: Richard Purdie <[email protected]> Cc: Bryan Wu <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>