Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8d82fef8 authored by Stefan Sørensen's avatar Stefan Sørensen Committed by Bryan Wu
Browse files

leds: Turn off led if blinking is disabled



When using the timer trigger and setting delay_on to 0, the led
will stay in whatever state is was in, while intuitively one
would expect it to turn off. This patch changes the behaviour to
turn it off.

Signed-off-by: default avatarStefan Sørensen <stefan.sorensen@spectralink.com>
Signed-off-by: default avatarBryan Wu <cooloney@gmail.com>
parent fba14ae8
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -39,9 +39,11 @@ static void led_set_software_blink(struct led_classdev *led_cdev,
	led_cdev->blink_delay_on = delay_on;
	led_cdev->blink_delay_off = delay_off;

	/* never on - don't blink */
	if (!delay_on)
	/* never on - just set to off */
	if (!delay_on) {
		__led_set_brightness(led_cdev, LED_OFF);
		return;
	}

	/* never off - just set to brightness */
	if (!delay_off) {