diff mbox series

leds: trigger: netdev: Remove not needed call to led_set_brightness in deactivate

Message ID 8dc929e7-8e14-4c85-aa28-9c5fe2620f52@gmail.com
State New
Headers show
Series leds: trigger: netdev: Remove not needed call to led_set_brightness in deactivate | expand

Commit Message

Heiner Kallweit April 5, 2024, 8:53 p.m. UTC
led_trigger_set() is the only caller of the deactivate() callback,
and it calls led_set_brightness(LED_OFF) anyway after deactivate().
So we can remove the call here.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 drivers/leds/trigger/ledtrig-netdev.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Lee Jones April 11, 2024, 2:09 p.m. UTC | #1
On Fri, 05 Apr 2024 22:53:08 +0200, Heiner Kallweit wrote:
> led_trigger_set() is the only caller of the deactivate() callback,
> and it calls led_set_brightness(LED_OFF) anyway after deactivate().
> So we can remove the call here.
> 
> 

Applied, thanks!

[1/1] leds: trigger: netdev: Remove not needed call to led_set_brightness in deactivate
      commit: b487c4e76657241197e056d06b4b73eab714f0e3

--
Lee Jones [李琼斯]
diff mbox series

Patch

diff --git a/drivers/leds/trigger/ledtrig-netdev.c b/drivers/leds/trigger/ledtrig-netdev.c
index ea00f6c70..22bba8e97 100644
--- a/drivers/leds/trigger/ledtrig-netdev.c
+++ b/drivers/leds/trigger/ledtrig-netdev.c
@@ -724,8 +724,6 @@  static void netdev_trig_deactivate(struct led_classdev *led_cdev)
 
 	cancel_delayed_work_sync(&trigger_data->work);
 
-	led_set_brightness(led_cdev, LED_OFF);
-
 	dev_put(trigger_data->net_dev);
 
 	kfree(trigger_data);