lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220121165436.30956-15-sampaio.ime@gmail.com>
Date:   Fri, 21 Jan 2022 13:54:19 -0300
From:   Luiz Sampaio <sampaio.ime@...il.com>
To:     Jiri Slaby <jirislaby@...nel.org>,
        Nick Kossifidis <mickflemm@...il.com>,
        Luis Chamberlain <mcgrof@...nel.org>,
        Kalle Valo <kvalo@...nel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>, ath9k-devel@....qualcomm.com
Cc:     linux-kernel@...r.kernel.org, Luiz Sampaio <sampaio.ime@...il.com>,
        linux-wireless@...r.kernel.org, netdev@...r.kernel.org
Subject: [PATCH 14/31] net: wireless: ath: 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/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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ