mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-12 20:35:23 +02:00
Revert "leds: triggers: Flush pending brightness before activating trigger"
This reverts commit93ac74cd6f
which is commitab477b766e
upstream. It breaks the Android kernel abi and can be brought back in the future in an abi-safe way if it is really needed. Bug: 161946584 Change-Id: Iac75019b57af7941f928d7c048379f5b841f8973 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
parent
93aa9d1549
commit
e7c29758db
|
@ -201,12 +201,6 @@ int led_trigger_set(struct led_classdev *led_cdev, struct led_trigger *trig)
|
|||
*/
|
||||
synchronize_rcu();
|
||||
|
||||
/*
|
||||
* If "set brightness to 0" is pending in workqueue,
|
||||
* we don't want that to be reordered after ->activate()
|
||||
*/
|
||||
flush_work(&led_cdev->set_brightness_work);
|
||||
|
||||
ret = 0;
|
||||
if (trig->activate)
|
||||
ret = trig->activate(led_cdev);
|
||||
|
|
|
@ -110,6 +110,11 @@ static int timer_trig_activate(struct led_classdev *led_cdev)
|
|||
led_cdev->flags &= ~LED_INIT_DEFAULT_TRIGGER;
|
||||
}
|
||||
|
||||
/*
|
||||
* If "set brightness to 0" is pending in workqueue, we don't
|
||||
* want that to be reordered after blink_set()
|
||||
*/
|
||||
flush_work(&led_cdev->set_brightness_work);
|
||||
led_blink_set(led_cdev, &led_cdev->blink_delay_on,
|
||||
&led_cdev->blink_delay_off);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user