[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220121165436.30956-20-sampaio.ime@gmail.com>
Date: Fri, 21 Jan 2022 13:54:24 -0300
From: Luiz Sampaio <sampaio.ime@...il.com>
To: Herton Ronaldo Krzesinski <herton@...onical.com>,
Hin-Tak Leung <htl10@...rs.sourceforge.net>,
Larry Finger <Larry.Finger@...inger.net>,
Kalle Valo <kvalo@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>
Cc: linux-kernel@...r.kernel.org, Luiz Sampaio <sampaio.ime@...il.com>,
linux-wireless@...r.kernel.org, netdev@...r.kernel.org
Subject: [PATCH 19/31] net: realtek: 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/realtek/rtl818x/rtl8187/leds.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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,
--
2.34.1
Powered by blists - more mailing lists