diff mbox series

[19/31] net: realtek: changing LED_* from enum led_brightness to actual value

Message ID 20220121165436.30956-20-sampaio.ime@gmail.com
State New
Headers show
Series None | expand

Commit Message

Luiz Sampaio Jan. 21, 2022, 4:54 p.m. UTC
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/realtek/rtl818x/rtl8187/leds.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/net/wireless/realtek/rtl818x/rtl8187/leds.c b/drivers/net/wireless/realtek/rtl818x/rtl8187/leds.c
index 49421d10e22b..6ddbdb5e3fa5 100644
--- a/drivers/net/wireless/realtek/rtl818x/rtl8187/leds.c
+++ b/drivers/net/wireless/realtek/rtl818x/rtl8187/leds.c
@@ -109,7 +109,7 @@  static void rtl8187_led_brightness_set(struct led_classdev *led_dev,
 		return;
 	priv = hw->priv;
 	if (led->is_radio) {
-		if (brightness == LED_FULL) {
+		if (brightness == 255) {
 			ieee80211_queue_delayed_work(hw, &priv->led_on, 0);
 			radio_on = true;
 		} else if (radio_on) {
@@ -118,7 +118,7 @@  static void rtl8187_led_brightness_set(struct led_classdev *led_dev,
 			ieee80211_queue_delayed_work(hw, &priv->led_off, 0);
 		}
 	} else if (radio_on) {
-		if (brightness == LED_OFF) {
+		if (brightness == 0) {
 			ieee80211_queue_delayed_work(hw, &priv->led_off, 0);
 			/* The LED is off for 1/20 sec - it just blinks. */
 			ieee80211_queue_delayed_work(hw, &priv->led_on,