Search Linux Wireless

[PATCH 14/31] net: wireless: ath: changing LED_* from enum led_brightness to actual value

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

 



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/ath/ath5k/led.c          | 2 +-
 drivers/net/wireless/ath/ath9k/gpio.c         | 4 ++--
 drivers/net/wireless/ath/ath9k/htc_drv_gpio.c | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/ath/ath5k/led.c b/drivers/net/wireless/ath/ath5k/led.c
index 33e9928af363..df3db4851bf3 100644
--- a/drivers/net/wireless/ath/ath5k/led.c
+++ b/drivers/net/wireless/ath/ath5k/led.c
@@ -118,7 +118,7 @@ ath5k_led_brightness_set(struct led_classdev *led_dev,
 	struct ath5k_led *led = container_of(led_dev, struct ath5k_led,
 		led_dev);
 
-	if (brightness == LED_OFF)
+	if (brightness == 0)
 		ath5k_led_off(led->ah);
 	else
 		ath5k_led_on(led->ah);
diff --git a/drivers/net/wireless/ath/ath9k/gpio.c b/drivers/net/wireless/ath/ath9k/gpio.c
index b457e52dd365..0828dc9d3503 100644
--- a/drivers/net/wireless/ath/ath9k/gpio.c
+++ b/drivers/net/wireless/ath/ath9k/gpio.c
@@ -52,7 +52,7 @@ static void ath_led_brightness(struct led_classdev *led_cdev,
 			       enum led_brightness brightness)
 {
 	struct ath_softc *sc = container_of(led_cdev, struct ath_softc, led_cdev);
-	u32 val = (brightness == LED_OFF);
+	u32 val = (brightness == 0);
 
 	if (sc->sc_ah->config.led_active_high)
 		val = !val;
@@ -65,7 +65,7 @@ void ath_deinit_leds(struct ath_softc *sc)
 	if (!sc->led_registered)
 		return;
 
-	ath_led_brightness(&sc->led_cdev, LED_OFF);
+	ath_led_brightness(&sc->led_cdev, 0);
 	led_classdev_unregister(&sc->led_cdev);
 
 	ath9k_hw_gpio_free(sc->sc_ah, sc->sc_ah->led_pin);
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_gpio.c b/drivers/net/wireless/ath/ath9k/htc_drv_gpio.c
index ecb848b60725..7a9369f06534 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_gpio.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_gpio.c
@@ -230,7 +230,7 @@ void ath9k_led_work(struct work_struct *work)
 						   led_work);
 
 	ath9k_hw_set_gpio(priv->ah, priv->ah->led_pin,
-			  (priv->brightness == LED_OFF));
+			  (priv->brightness == 0));
 }
 
 static void ath9k_led_brightness(struct led_classdev *led_cdev,
@@ -250,7 +250,7 @@ void ath9k_deinit_leds(struct ath9k_htc_priv *priv)
 	if (!priv->led_registered)
 		return;
 
-	ath9k_led_brightness(&priv->led_cdev, LED_OFF);
+	ath9k_led_brightness(&priv->led_cdev, 0);
 	led_classdev_unregister(&priv->led_cdev);
 	cancel_work_sync(&priv->led_work);
 
-- 
2.34.1




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux