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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220121165436.30956-4-sampaio.ime@gmail.com>
Date:   Fri, 21 Jan 2022 13:54:08 -0300
From:   Luiz Sampaio <sampaio.ime@...il.com>
To:     Guenter Roeck <linux@...ck-us.net>,
        Jean Delvare <jdelvare@...e.com>
Cc:     linux-kernel@...r.kernel.org, Luiz Sampaio <sampaio.ime@...il.com>,
        linux-hwmon@...r.kernel.org
Subject: [PATCH 03/31] hwmon: pmbus: 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/hwmon/pmbus/ibm-cffps.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/hwmon/pmbus/ibm-cffps.c b/drivers/hwmon/pmbus/ibm-cffps.c
index e3294a1a54bb..cc20a70c723b 100644
--- a/drivers/hwmon/pmbus/ibm-cffps.c
+++ b/drivers/hwmon/pmbus/ibm-cffps.c
@@ -382,10 +382,10 @@ static int ibm_cffps_led_brightness_set(struct led_classdev *led_cdev,
 	u8 next_led_state;
 	struct ibm_cffps *psu = container_of(led_cdev, struct ibm_cffps, led);
 
-	if (brightness == LED_OFF) {
+	if (brightness == 0) {
 		next_led_state = CFFPS_LED_OFF;
 	} else {
-		brightness = LED_FULL;
+		brightness = 255;
 
 		if (psu->led_state != CFFPS_LED_BLINK)
 			next_led_state = CFFPS_LED_ON;
@@ -426,7 +426,7 @@ static int ibm_cffps_led_blink_set(struct led_classdev *led_cdev,
 		return rc;
 
 	psu->led_state = CFFPS_LED_BLINK;
-	led_cdev->brightness = LED_FULL;
+	led_cdev->brightness = 255;
 	*delay_on = CFFPS_BLINK_RATE_MS;
 	*delay_off = CFFPS_BLINK_RATE_MS;
 
@@ -442,7 +442,7 @@ static void ibm_cffps_create_led_class(struct ibm_cffps *psu)
 	snprintf(psu->led_name, sizeof(psu->led_name), "%s-%02x", client->name,
 		 client->addr);
 	psu->led.name = psu->led_name;
-	psu->led.max_brightness = LED_FULL;
+	psu->led.max_brightness = 255;
 	psu->led.brightness_set_blocking = ibm_cffps_led_brightness_set;
 	psu->led.blink_set = ibm_cffps_led_blink_set;
 
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ