diff options
author | Andrew Lunn <andrew@lunn.ch> | 2015-08-20 06:22:57 -0400 |
---|---|---|
committer | Jacek Anaszewski <j.anaszewski@samsung.com> | 2016-01-04 03:57:33 -0500 |
commit | 95b2af637e283e3d549c8a6af9f182b0bd972a2e (patch) | |
tree | ab1d6e73c0a060faa36dda71b66ab0b9cd829e8e /drivers/leds/leds-lp5562.c | |
parent | 525d6a65a2abe279889b019e2663b8a11bc4f90b (diff) |
leds: lp55xx: Remove work queue
Now the core implements the work queue, remove it from the drivers,
and switch to using brightness_set_blocking op.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Cc: Milo Kim <milo.kim@ti.com>
Diffstat (limited to 'drivers/leds/leds-lp5562.c')
-rw-r--r-- | drivers/leds/leds-lp5562.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/leds/leds-lp5562.c b/drivers/leds/leds-lp5562.c index 0360c59dbdc9..b75333803a63 100644 --- a/drivers/leds/leds-lp5562.c +++ b/drivers/leds/leds-lp5562.c | |||
@@ -311,10 +311,8 @@ static int lp5562_post_init_device(struct lp55xx_chip *chip) | |||
311 | return 0; | 311 | return 0; |
312 | } | 312 | } |
313 | 313 | ||
314 | static void lp5562_led_brightness_work(struct work_struct *work) | 314 | static int lp5562_led_brightness(struct lp55xx_led *led) |
315 | { | 315 | { |
316 | struct lp55xx_led *led = container_of(work, struct lp55xx_led, | ||
317 | brightness_work); | ||
318 | struct lp55xx_chip *chip = led->chip; | 316 | struct lp55xx_chip *chip = led->chip; |
319 | u8 addr[] = { | 317 | u8 addr[] = { |
320 | LP5562_REG_R_PWM, | 318 | LP5562_REG_R_PWM, |
@@ -322,10 +320,13 @@ static void lp5562_led_brightness_work(struct work_struct *work) | |||
322 | LP5562_REG_B_PWM, | 320 | LP5562_REG_B_PWM, |
323 | LP5562_REG_W_PWM, | 321 | LP5562_REG_W_PWM, |
324 | }; | 322 | }; |
323 | int ret; | ||
325 | 324 | ||
326 | mutex_lock(&chip->lock); | 325 | mutex_lock(&chip->lock); |
327 | lp55xx_write(chip, addr[led->chan_nr], led->brightness); | 326 | ret = lp55xx_write(chip, addr[led->chan_nr], led->brightness); |
328 | mutex_unlock(&chip->lock); | 327 | mutex_unlock(&chip->lock); |
328 | |||
329 | return ret; | ||
329 | } | 330 | } |
330 | 331 | ||
331 | static void lp5562_write_program_memory(struct lp55xx_chip *chip, | 332 | static void lp5562_write_program_memory(struct lp55xx_chip *chip, |
@@ -503,7 +504,7 @@ static struct lp55xx_device_config lp5562_cfg = { | |||
503 | }, | 504 | }, |
504 | .post_init_device = lp5562_post_init_device, | 505 | .post_init_device = lp5562_post_init_device, |
505 | .set_led_current = lp5562_set_led_current, | 506 | .set_led_current = lp5562_set_led_current, |
506 | .brightness_work_fn = lp5562_led_brightness_work, | 507 | .brightness_fn = lp5562_led_brightness, |
507 | .run_engine = lp5562_run_engine, | 508 | .run_engine = lp5562_run_engine, |
508 | .firmware_cb = lp5562_firmware_loaded, | 509 | .firmware_cb = lp5562_firmware_loaded, |
509 | .dev_attr_group = &lp5562_group, | 510 | .dev_attr_group = &lp5562_group, |