[PATCH 16/31] net: broadcom: changing LED_* from enum led_brightness to actual value

From: Luiz Sampaio
Date: Fri Jan 21 2022 - 11:57:11 EST


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