Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds
Pull LED subsystem update from Bryan Wu. * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds: (47 commits) leds: leds-lp5521: return an error code on error in probe() leds: leds-clevo-mail: Use pr_* instead of printks leds: leds-rb532: Fix checkpatch errors leds: led-triggers: Fix checkpatch warnings leds: ledtrig-backlight: Fix checkpatch error leds: leds-wrap: Use <linux/io.h> instead of <asm/io.h> leds: leds-wm8350: Use dev_err instead of printk leds: leds-pwm: Fix checkpatch warning leds: leds-pca955x: Use dev_info instead of printk leds: leds-net48xx: Use linux/io.h instead of asm/io.h leds: leds-lt3593: Fix checkpatch warnings leds: leds-gpio: Use dev_info instead of printk leds: leds-da903x: Fix checkpatch error and warnings leds: leds-bd2802: Fix checkpatch warnings leds: leds-adp5520: Fix checkpatch warnings leds: led-class: Fix checkpatch warning leds: leds-ns2: use devm_gpio_request_one leds: leds-lt3593: use devm_gpio_request_one leds: leds-gpio: use devm_gpio_request_one leds: lp3944: Fix return value ...
Esse commit está contido em:
@@ -152,7 +152,7 @@ static int lp5521_read(struct i2c_client *client, u8 reg, u8 *buf)
|
||||
|
||||
ret = i2c_smbus_read_byte_data(client, reg);
|
||||
if (ret < 0)
|
||||
return -EIO;
|
||||
return ret;
|
||||
|
||||
*buf = ret;
|
||||
return 0;
|
||||
@@ -616,7 +616,7 @@ static ssize_t store_led_pattern(struct device *dev,
|
||||
unsigned long val;
|
||||
int ret;
|
||||
|
||||
ret = strict_strtoul(buf, 16, &val);
|
||||
ret = kstrtoul(buf, 16, &val);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
@@ -788,10 +788,17 @@ static int lp5521_probe(struct i2c_client *client,
|
||||
* LP5521_REG_ENABLE register will not have any effect - strange!
|
||||
*/
|
||||
ret = lp5521_read(client, LP5521_REG_R_CURRENT, &buf);
|
||||
if (ret || buf != LP5521_REG_R_CURR_DEFAULT) {
|
||||
if (ret) {
|
||||
dev_err(&client->dev, "error in resetting chip\n");
|
||||
goto fail2;
|
||||
}
|
||||
if (buf != LP5521_REG_R_CURR_DEFAULT) {
|
||||
dev_err(&client->dev,
|
||||
"unexpected data in register (expected 0x%x got 0x%x)\n",
|
||||
LP5521_REG_R_CURR_DEFAULT, buf);
|
||||
ret = -EINVAL;
|
||||
goto fail2;
|
||||
}
|
||||
usleep_range(10000, 20000);
|
||||
|
||||
ret = lp5521_detect(client);
|
||||
|
Referência em uma nova issue
Block a user