diff mbox series

[3/3] leds: leds-bcm63138: get rid of LED_OFF

Message ID 20220717124248.13562-4-zajec5@gmail.com
State New
Headers show
Series leds-bcm63138: post apply/review fixes | expand

Commit Message

Rafał Miłecki July 17, 2022, 12:42 p.m. UTC
From: Rafał Miłecki <rafal@milecki.pl>

The whole "enum led_brightness" is marked as obsolete. Replace it with a
(non-)zero check.

Reported-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
 drivers/leds/blink/leds-bcm63138.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/leds/blink/leds-bcm63138.c b/drivers/leds/blink/leds-bcm63138.c
index c083cb1332cb..2cf2761e4914 100644
--- a/drivers/leds/blink/leds-bcm63138.c
+++ b/drivers/leds/blink/leds-bcm63138.c
@@ -113,8 +113,7 @@  static void bcm63138_leds_enable_led(struct bcm63138_leds *leds,
 {
 	u32 bit = BIT(led->pin);
 
-	bcm63138_leds_update_bits(leds, BCM63138_SW_DATA, bit,
-				  value == LED_OFF ? 0 : bit);
+	bcm63138_leds_update_bits(leds, BCM63138_SW_DATA, bit, value ? bit : 0);
 }
 
 /*