diff options
author | David S. Miller <davem@davemloft.net> | 2016-01-13 06:21:27 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-01-13 06:21:27 +0100 |
commit | ddb5388ffd0ad75d07e7b78181a0b579824ba6f0 (patch) | |
tree | be1e2bd103c69d7bbace3fffd97bc3d714bbc3d7 /drivers/leds/leds-lp5521.c | |
parent | net: netlink: Fix multicast group storage allocation for families with more t... (diff) | |
parent | Merge tag 'pm+acpi-4.5-rc1-1' of git://git.kernel.org/pub/scm/linux/kernel/gi... (diff) | |
download | linux-ddb5388ffd0ad75d07e7b78181a0b579824ba6f0.tar.xz linux-ddb5388ffd0ad75d07e7b78181a0b579824ba6f0.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux
Diffstat (limited to 'drivers/leds/leds-lp5521.c')
-rw-r--r-- | drivers/leds/leds-lp5521.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/leds/leds-lp5521.c b/drivers/leds/leds-lp5521.c index 63a92542c8cb..549b315ca8fe 100644 --- a/drivers/leds/leds-lp5521.c +++ b/drivers/leds/leds-lp5521.c @@ -362,16 +362,17 @@ static int lp5521_run_selftest(struct lp55xx_chip *chip, char *buf) return 0; } -static void lp5521_led_brightness_work(struct work_struct *work) +static int lp5521_led_brightness(struct lp55xx_led *led) { - struct lp55xx_led *led = container_of(work, struct lp55xx_led, - brightness_work); struct lp55xx_chip *chip = led->chip; + int ret; mutex_lock(&chip->lock); - lp55xx_write(chip, LP5521_REG_LED_PWM_BASE + led->chan_nr, + ret = lp55xx_write(chip, LP5521_REG_LED_PWM_BASE + led->chan_nr, led->brightness); mutex_unlock(&chip->lock); + + return ret; } static ssize_t show_engine_mode(struct device *dev, @@ -501,7 +502,7 @@ static struct lp55xx_device_config lp5521_cfg = { }, .max_channel = LP5521_MAX_LEDS, .post_init_device = lp5521_post_init_device, - .brightness_work_fn = lp5521_led_brightness_work, + .brightness_fn = lp5521_led_brightness, .set_led_current = lp5521_set_led_current, .firmware_cb = lp5521_firmware_loaded, .run_engine = lp5521_run_engine, |