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-25-sampaio.ime@gmail.com>
Date:   Fri, 21 Jan 2022 13:54:29 -0300
From:   Luiz Sampaio <sampaio.ime@...il.com>
To:     Michael Hennerich <michael.hennerich@...log.com>,
        Lee Jones <lee.jones@...aro.org>,
        Daniel Thompson <daniel.thompson@...aro.org>,
        Jingoo Han <jingoohan1@...il.com>, Helge Deller <deller@....de>
Cc:     linux-kernel@...r.kernel.org, Luiz Sampaio <sampaio.ime@...il.com>,
        dri-devel@...ts.freedesktop.org, linux-fbdev@...r.kernel.org
Subject: [PATCH 24/31] video: backlight: 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/video/backlight/adp8860_bl.c | 4 ++--
 drivers/video/backlight/adp8870_bl.c | 4 ++--
 drivers/video/backlight/led_bl.c     | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/video/backlight/adp8860_bl.c b/drivers/video/backlight/adp8860_bl.c
index 8ec19425671f..063be4189e7e 100644
--- a/drivers/video/backlight/adp8860_bl.c
+++ b/drivers/video/backlight/adp8860_bl.c
@@ -261,10 +261,10 @@ static int adp8860_led_probe(struct i2c_client *client)
 		led_dat->cdev.name = cur_led->name;
 		led_dat->cdev.default_trigger = cur_led->default_trigger;
 		led_dat->cdev.brightness_set = adp8860_led_set;
-		led_dat->cdev.brightness = LED_OFF;
+		led_dat->cdev.brightness = 0;
 		led_dat->flags = cur_led->flags >> FLAG_OFFT_SHIFT;
 		led_dat->client = client;
-		led_dat->new_brightness = LED_OFF;
+		led_dat->new_brightness = 0;
 		INIT_WORK(&led_dat->work, adp8860_led_work);
 
 		ret = led_classdev_register(&client->dev, &led_dat->cdev);
diff --git a/drivers/video/backlight/adp8870_bl.c b/drivers/video/backlight/adp8870_bl.c
index 8b5213a39527..b04faf8d631d 100644
--- a/drivers/video/backlight/adp8870_bl.c
+++ b/drivers/video/backlight/adp8870_bl.c
@@ -287,10 +287,10 @@ static int adp8870_led_probe(struct i2c_client *client)
 		led_dat->cdev.name = cur_led->name;
 		led_dat->cdev.default_trigger = cur_led->default_trigger;
 		led_dat->cdev.brightness_set = adp8870_led_set;
-		led_dat->cdev.brightness = LED_OFF;
+		led_dat->cdev.brightness = 0;
 		led_dat->flags = cur_led->flags >> FLAG_OFFT_SHIFT;
 		led_dat->client = client;
-		led_dat->new_brightness = LED_OFF;
+		led_dat->new_brightness = 0;
 		INIT_WORK(&led_dat->work, adp8870_led_work);
 
 		ret = led_classdev_register(&client->dev, &led_dat->cdev);
diff --git a/drivers/video/backlight/led_bl.c b/drivers/video/backlight/led_bl.c
index f54d256e2d54..1b869624b4f8 100644
--- a/drivers/video/backlight/led_bl.c
+++ b/drivers/video/backlight/led_bl.c
@@ -46,7 +46,7 @@ static void led_bl_power_off(struct led_bl_data *priv)
 		return;
 
 	for (i = 0; i < priv->nb_leds; i++)
-		led_set_brightness(priv->leds[i], LED_OFF);
+		led_set_brightness(priv->leds[i], 0);
 
 	priv->enabled = false;
 }
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ