Hi Daniel,

I dropped that patch because we need to fix the problem
at the origin, i.e. inside led_trigger_set(). I submitted
the patch [0] doing that, and credited you by adding
Reported-by tag to the commit message.

Jacek Anaszewski

On 09/15/2016 01:48 PM, Jacek Anaszewski wrote:
Hi Daniel,

On 09/14/2016 11:23 AM, Daniel Romell wrote:
In led_trigger_remove(), check if there is a trigger
configured before calling led_trigger_set(). This will
prevent some unnecessary work, and more importantly stop
sending uevent change events when no change has in fact

Signed-off-by: Daniel Romell <d...@hms.se>
 drivers/leds/led-triggers.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/leds/led-triggers.c b/drivers/leds/led-triggers.c
index 59d6a3e..28c7a66 100644
--- a/drivers/leds/led-triggers.c
+++ b/drivers/leds/led-triggers.c
@@ -147,7 +147,8 @@ EXPORT_SYMBOL_GPL(led_trigger_set);
 void led_trigger_remove(struct led_classdev *led_cdev)
-    led_trigger_set(led_cdev, NULL);
+    if (led_cdev->trigger)
+        led_trigger_set(led_cdev, NULL);

Thanks for the patch. Applied.

[0] https://git.kernel.org/cgit/linux/kernel/git/j.anaszewski/linux-leds.git/commit/?h=for-next&id=19afa7b4c4c9deebd312d293df2e2703de29e26a

Reply via email to