Revert "leds: trigger: Call synchronize_rcu() before calling trig->activate()"

This reverts commit c3f8e2ec3c which is
commit b1bbd20f35e19774ea01989320495e09ac44fba3 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: I3c84527151f1018837dce6c1c77756ae4909da8e
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Greg Kroah-Hartman
2024-09-14 14:36:51 +00:00
parent ba60d6bd37
commit 35455634f9

View File

@@ -193,13 +193,6 @@ int led_trigger_set(struct led_classdev *led_cdev, struct led_trigger *trig)
spin_unlock(&trig->leddev_list_lock);
led_cdev->trigger = trig;
/*
* Some activate() calls use led_trigger_event() to initialize
* the brightness of the LED for which the trigger is being set.
* Ensure the led_cdev is visible on trig->led_cdevs for this.
*/
synchronize_rcu();
ret = 0;
if (trig->activate)
ret = trig->activate(led_cdev);