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-next>] [day] [month] [year] [list]
Message-Id: <20250121064236.168236-1-oushixiong1025@163.com>
Date: Tue, 21 Jan 2025 14:42:36 +0800
From: oushixiong1025@....com
To: Helge Deller <deller@....de>
Cc: Thomas Zimmermann <tzimmermann@...e.de>,
	Arnd Bergmann <arnd@...db.de>,
	Javier Martinez Canillas <javierm@...hat.com>,
	Lee Jones <lee@...nel.org>,
	Uwe Kleine-König <u.kleine-koenig@...libre.com>,
	linux-fbdev@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	dri-devel@...ts.freedesktop.org,
	Shixiong Ou <oushixiong@...inos.cn>
Subject: [PATCH] fbdev/sh_mobile_lcdcfb: Use backlight helper

From: Shixiong Ou <oushixiong@...inos.cn>

Signed-off-by: Shixiong Ou <oushixiong@...inos.cn>
---
 drivers/video/fbdev/sh_mobile_lcdcfb.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/video/fbdev/sh_mobile_lcdcfb.c b/drivers/video/fbdev/sh_mobile_lcdcfb.c
index 6b37b188af31..69c9067eff88 100644
--- a/drivers/video/fbdev/sh_mobile_lcdcfb.c
+++ b/drivers/video/fbdev/sh_mobile_lcdcfb.c
@@ -2123,11 +2123,7 @@ sh_mobile_lcdc_channel_fb_init(struct sh_mobile_lcdc_chan *ch,
 static int sh_mobile_lcdc_update_bl(struct backlight_device *bdev)
 {
 	struct sh_mobile_lcdc_chan *ch = bl_get_data(bdev);
-	int brightness = bdev->props.brightness;
-
-	if (bdev->props.power != FB_BLANK_UNBLANK ||
-	    bdev->props.state & (BL_CORE_SUSPENDED | BL_CORE_FBBLANK))
-		brightness = 0;
+	int brightness = backlight_get_brightness(bdev);
 
 	ch->bl_brightness = brightness;
 	return ch->cfg->bl_info.set_brightness(brightness);
-- 
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ