[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220121165436.30956-17-sampaio.ime@gmail.com>
Date: Fri, 21 Jan 2022 13:54:21 -0300
From: Luiz Sampaio <sampaio.ime@...il.com>
To: Kalle Valo <kvalo@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Larry Finger <Larry.Finger@...inger.net>
Cc: linux-kernel@...r.kernel.org, Luiz Sampaio <sampaio.ime@...il.com>,
linux-wireless@...r.kernel.org, b43-dev@...ts.infradead.org,
netdev@...r.kernel.org
Subject: [PATCH 16/31] net: broadcom: changing LED_* from enum led_brightness to actual value
The enum led_brightness, which contains the declaration of LED_OFF,
LED_ON, LED_HALF and LED_FULL is obsolete, as the led class now supports
max_brightness.
---
drivers/net/wireless/broadcom/b43/leds.c | 2 +-
drivers/net/wireless/broadcom/b43legacy/leds.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/broadcom/b43/leds.c b/drivers/net/wireless/broadcom/b43/leds.c
index 982a772a9d87..bdb46168e019 100644
--- a/drivers/net/wireless/broadcom/b43/leds.c
+++ b/drivers/net/wireless/broadcom/b43/leds.c
@@ -59,7 +59,7 @@ static void b43_led_update(struct b43_wldev *dev,
* with the brightness_set handler, we will be called again soon
* to fixup our state. */
if (radio_enabled)
- turn_on = atomic_read(&led->state) != LED_OFF;
+ turn_on = atomic_read(&led->state) != 0;
else
turn_on = false;
if (turn_on == led->hw_state)
diff --git a/drivers/net/wireless/broadcom/b43legacy/leds.c b/drivers/net/wireless/broadcom/b43legacy/leds.c
index 38b5be3a84e2..5803d41185e7 100644
--- a/drivers/net/wireless/broadcom/b43legacy/leds.c
+++ b/drivers/net/wireless/broadcom/b43legacy/leds.c
@@ -66,7 +66,7 @@ static void b43legacy_led_brightness_set(struct led_classdev *led_dev,
* whether the LED has the wrong state for a second. */
radio_enabled = (dev->phy.radio_on && dev->radio_hw_enable);
- if (brightness == LED_OFF || !radio_enabled)
+ if (brightness == 0 || !radio_enabled)
b43legacy_led_turn_off(dev, led->index, led->activelow);
else
b43legacy_led_turn_on(dev, led->index, led->activelow);
--
2.34.1
Powered by blists - more mailing lists