diff options
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) | |||
362 | return 0; | 362 | return 0; |
363 | } | 363 | } |
364 | 364 | ||
365 | static void lp5521_led_brightness_work(struct work_struct *work) | 365 | static int lp5521_led_brightness(struct lp55xx_led *led) |
366 | { | 366 | { |
367 | struct lp55xx_led *led = container_of(work, struct lp55xx_led, | ||
368 | brightness_work); | ||
369 | struct lp55xx_chip *chip = led->chip; | 367 | struct lp55xx_chip *chip = led->chip; |
368 | int ret; | ||
370 | 369 | ||
371 | mutex_lock(&chip->lock); | 370 | mutex_lock(&chip->lock); |
372 | lp55xx_write(chip, LP5521_REG_LED_PWM_BASE + led->chan_nr, | 371 | ret = lp55xx_write(chip, LP5521_REG_LED_PWM_BASE + led->chan_nr, |
373 | led->brightness); | 372 | led->brightness); |
374 | mutex_unlock(&chip->lock); | 373 | mutex_unlock(&chip->lock); |
374 | |||
375 | return ret; | ||
375 | } | 376 | } |
376 | 377 | ||
377 | static ssize_t show_engine_mode(struct device *dev, | 378 | static ssize_t show_engine_mode(struct device *dev, |
@@ -501,7 +502,7 @@ static struct lp55xx_device_config lp5521_cfg = { | |||
501 | }, | 502 | }, |
502 | .max_channel = LP5521_MAX_LEDS, | 503 | .max_channel = LP5521_MAX_LEDS, |
503 | .post_init_device = lp5521_post_init_device, | 504 | .post_init_device = lp5521_post_init_device, |
504 | .brightness_work_fn = lp5521_led_brightness_work, | 505 | .brightness_fn = lp5521_led_brightness, |
505 | .set_led_current = lp5521_set_led_current, | 506 | .set_led_current = lp5521_set_led_current, |
506 | .firmware_cb = lp5521_firmware_loaded, | 507 | .firmware_cb = lp5521_firmware_loaded, |
507 | .run_engine = lp5521_run_engine, | 508 | .run_engine = lp5521_run_engine, |