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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220121165436.30956-30-sampaio.ime@gmail.com>
Date:   Fri, 21 Jan 2022 13:54:34 -0300
From:   Luiz Sampaio <sampaio.ime@...il.com>
To:     Johannes Berg <johannes@...solutions.net>,
        "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 29/31] net: rfkill: 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.
---
 net/rfkill/core.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/net/rfkill/core.c b/net/rfkill/core.c
index 5b1927d66f0d..68b4c3a71513 100644
--- a/net/rfkill/core.c
+++ b/net/rfkill/core.c
@@ -125,9 +125,9 @@ static void rfkill_led_trigger_event(struct rfkill *rfkill)
 	trigger = &rfkill->led_trigger;
 
 	if (rfkill->state & RFKILL_BLOCK_ANY)
-		led_trigger_event(trigger, LED_OFF);
+		led_trigger_event(trigger, 0);
 	else
-		led_trigger_event(trigger, LED_FULL);
+		led_trigger_event(trigger, 255);
 }
 
 static int rfkill_led_trigger_activate(struct led_classdev *led)
@@ -180,7 +180,7 @@ static void rfkill_global_led_trigger_worker(struct work_struct *work)
 	mutex_lock(&rfkill_global_mutex);
 	list_for_each_entry(rfkill, &rfkill_list, node) {
 		if (!(rfkill->state & RFKILL_BLOCK_ANY)) {
-			brightness = LED_FULL;
+			brightness = 255;
 			break;
 		}
 	}
@@ -188,7 +188,7 @@ static void rfkill_global_led_trigger_worker(struct work_struct *work)
 
 	led_trigger_event(&rfkill_any_led_trigger, brightness);
 	led_trigger_event(&rfkill_none_led_trigger,
-			  brightness == LED_OFF ? LED_FULL : LED_OFF);
+			  brightness == 0 ? 255 : 0);
 }
 
 static void rfkill_global_led_trigger_event(void)
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ