- 03 Dec, 2012 1 commit
-
-
Dan Carpenter authored
If "buf" wasn't equal to LP5521_REG_R_CURR_DEFAULT the probe fails but we still return zero. I've changed it to print an error message and return -EINVAL. Reported-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
-
- 28 Nov, 2012 2 commits
-
-
Sachin Kamat authored
Silences checkpatch warnings related to the use of printks. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Bryan Wu <cooloney@gmail.com>
-
Sachin Kamat authored
Fixes the following issues: ERROR: code indent should use tabs where possible WARNING: please, no spaces at the start of a line Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Bryan Wu <cooloney@gmail.com>
-
- 27 Nov, 2012 16 commits
-
-
Sachin Kamat authored
Fixes the following type of warnings: WARNING: Prefer netdev_warn(netdev, ... then dev_warn(dev, ... then pr_warn(... to printk(KERN_WARNING ... WARNING: quoted string split across lines While at it also fix a coding style issue w.r.t braces. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Bryan Wu <cooloney@gmail.com>
-
Sachin Kamat authored
Fixes the following checkpatch error: ERROR: space prohibited before that ':' (ctx:WxE) Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Bryan Wu <cooloney@gmail.com>
-
Sachin Kamat authored
Fixes the following checkpatch warning: WARNING: Use #include <linux/io.h> instead of <asm/io.h> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Bryan Wu <cooloney@gmail.com>
-
Sachin Kamat authored
Fixes the following type of checkpatch warnings: WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ... Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Bryan Wu <cooloney@gmail.com>
-
Sachin Kamat authored
Fixes the following checkpatch warning: WARNING: please, no space before tabs FILE: leds/leds-pwm.c:29: ^Iunsigned int ^I^Iactive_low;$ Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Bryan Wu <cooloney@gmail.com>
-
Sachin Kamat authored
Fixes the following checkpatch warning: WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ... Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Bryan Wu <cooloney@gmail.com>
-
Sachin Kamat authored
Fixes the following checkpatch warning: WARNING: Use #include <linux/io.h> instead of <asm/io.h> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Bryan Wu <cooloney@gmail.com>
-
Sachin Kamat authored
Fixes the following type of checkpatch warnings: WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ... Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Bryan Wu <cooloney@gmail.com>
-
Sachin Kamat authored
Fixes the following checkpatch warning: WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ... FILE: leds/leds-gpio.c:105: printk(KERN_INFO "Skipping unavailable LED gpio %d (%s)\n", Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Bryan Wu <cooloney@gmail.com>
-
Sachin Kamat authored
Fixes the following type of checkpatch error and warnings: WARNING: please, no space before tabs ERROR: trailing whitespace WARNING: quoted string split across lines Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Bryan Wu <cooloney@gmail.com>
-
Sachin Kamat authored
Fixes the following type of checkpatch warnings: WARNING: please, no space before tabs Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Bryan Wu <cooloney@gmail.com>
-
Sachin Kamat authored
Fixes the following type of checkpatch warnings: WARNING: please, no space before tabs Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Bryan Wu <cooloney@gmail.com>
-
Sachin Kamat authored
Fixes the following checkpatch warning: WARNING: Prefer netdev_dbg(netdev, ... then dev_dbg(dev, ... then pr_debug(... to printk(KERN_DEBUG ... FILE: leds/led-class.c:214: printk(KERN_DEBUG "Registered led device: %s\n", Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Bryan Wu <cooloney@gmail.com>
-
Sachin Kamat authored
devm_gpio_request_one is device managed and makes error handling and cleanup simpler. Cc: Simon Guinot <sguinot@lacie.com> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Bryan Wu <cooloney@gmail.com>
-
Sachin Kamat authored
devm_gpio_request_one is device managed and makes error handling and cleanup simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Bryan Wu <cooloney@gmail.com>
-
Sachin Kamat authored
devm_gpio_request_one is device managed and makes error handling and cleanup simpler. Cc: Raphael Assenat <raph@8d.com> Cc: Trent Piepho <tpiepho@freescale.com> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Bryan Wu <cooloney@gmail.com>
-
- 26 Nov, 2012 21 commits
-
-
Sachin Kamat authored
Return the value obtained from i2c_smbus_read_byte_data() instead of -EINVAL. Silences the following smatch warning: drivers/leds/leds-lp3944.c:89 lp3944_reg_read() info: why not propagate 'tmp' from i2c_smbus_read_byte_data() instead of -22? Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Bryan Wu <cooloney@gmail.com>
-
Sachin Kamat authored
Return the value obtained from i2c_smbus_read_byte_data() instead of -EIO. Silences the following smatch warning: drivers/leds/leds-lp5523.c:174 lp5523_read() info: why not propagate 'ret' from i2c_smbus_read_byte_data() instead of -5? Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Bryan Wu <cooloney@gmail.com>
-
Sachin Kamat authored
Return the value obtained from i2c_smbus_read_byte_data() instead of -EIO. Silences the following smatch warning: drivers/leds/leds-lp5521.c:155 lp5521_read() info: why not propagate 'ret' from i2c_smbus_read_byte_data() instead of -5? Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Bryan Wu <cooloney@gmail.com>
-
Jingoo Han authored
The usage of strict_strtoul() is not preferred, because strict_strtoul() is obsolete. Thus, kstrtoul() should be used. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
-
Jingoo Han authored
The usage of strict_strtoul() is not preferred, because strict_strtoul() is obsolete. Thus, kstrtoul() should be used. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
-
Jingoo Han authored
This patch fixes build warnings when CONFIG_LEDS_TRIGGERS is disabled as below: include/linux/leds.h:158:18: warning: 'struct led_trigger' declared inside parameter list [enabled by default] include/linux/leds.h:158:18: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default] Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Fabio Baltieri <fabio.baltieri@gmail.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
-
Fabio Baltieri authored
Implements a "led_trigger_rename" function to rename a trigger with proper locking. This assumes that led name was originally allocated in non-constant storage. Signed-off-by: Fabio Baltieri <fabio.baltieri@gmail.com> Cc: Kurt Van Dijck <kurt.van.dijck@eia.be> Signed-off-by: Bryan Wu <cooloney@gmail.com>
-
Axel Lin authored
We don't need these sysfs files to be world writable or group writable. These files are write-only, change them to S_IWUSR (0200). Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: G.Shark Jeong <gshark.jeong@gmail.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
-
Axel Lin authored
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 <axel.lin@ingics.com> Acked-by: G.Shark Jeong <gshark.jeong@gmail.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
-
Jingoo Han authored
The devm_kfree function 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 <jg1.han@samsung.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
-
Jingoo Han authored
This patch fixes build warnings as below: drivers/leds/leds-lp5523.c: In function 'lp5523_selftest': drivers/leds/leds-lp5523.c:496:18: warning: 'adc' may be used uninitialized in this function [-Wuninitialized] drivers/leds/leds-lp5523.c:471:5: warning: 'vdd' may be used uninitialized in this function [-Wuninitialized] drivers/leds/leds-lp5523.c: In function 'lp5523_probe': drivers/leds/leds-lp5523.c:252:9: warning: 'status' may be used uninitialized in this function [-Wuninitialized] drivers/leds/leds-lp5523.c:201:5: note: 'status' was declared here If lp5523_read() returns an error, problems will happen. Thus, when lp5523_read() returns an error, it should be handled. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
-
Roland Stigge authored
This patch makes leds-gpio's probe() return -EPROBE_DEFER if any of the gpios to register are deferred themselves. This makes a change of gpio_leds_create_of()'s return value necessary: Instead of returning NULL on error, we now use ERR_PTR() error coding. Signed-off-by: Roland Stigge <stigge@antcom.de> Signed-off-by: Bryan Wu <cooloney@gmail.com>
-
Jingoo Han authored
The usage of strict_strtoul() is not preferred, because strict_strtoul() is obsolete. Thus, kstrtoul() should be used. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
-
Jingoo Han authored
The usage of strict_strtoul() is not preferred, because strict_strtoul() is obsolete. Thus, kstrtoul() should be used. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
-
Jingoo Han authored
The usage of strict_strtoul() is not preferred, because strict_strtoul() is obsolete. Thus, kstrtoul() should be used. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
-
Jingoo Han authored
The usage of strict_strtoul() is not preferred, because strict_strtoul() is obsolete. Thus, kstrtoul() should be used. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
-
Jingoo Han authored
The usage of strict_strtoul() is not preferred, because strict_strtoul() is obsolete. Thus, kstrtoul() should be used. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
-
Jingoo Han authored
The usage of strict_strtoul() is not preferred, because strict_strtoul() is obsolete. Thus, kstrtoul() should be used. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
-
Jingoo Han authored
The devm_ functions allocate memory that is released when a driver detaches. This makes the code smaller and a bit simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
-
Jingoo Han authored
The devm_ functions allocate memory that is released when a driver detaches. This patch uses devm_ioremap() for these functions. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
-
Jingoo Han authored
The devm_ functions allocate memory that is released when a driver detaches. This patch uses devm_ioremap() for these functions. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
-