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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Rafał Miłecki <rafal@xxxxxxxxxx>

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

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

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);
 }
 
 /*
-- 
2.34.1




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux