hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/video/backlight/wm831x_bl.c
....@@ -1,11 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Backlight driver for Wolfson Microelectronics WM831x PMICs
34 *
45 * Copyright 2009 Wolfson Microelectonics plc
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License version 2 as
8
- * published by the Free Software Foundation.
96 */
107
118 #include <linux/kernel.h>
....@@ -94,18 +91,7 @@
9491
9592 static int wm831x_backlight_update_status(struct backlight_device *bl)
9693 {
97
- int brightness = bl->props.brightness;
98
-
99
- if (bl->props.power != FB_BLANK_UNBLANK)
100
- brightness = 0;
101
-
102
- if (bl->props.fb_blank != FB_BLANK_UNBLANK)
103
- brightness = 0;
104
-
105
- if (bl->props.state & BL_CORE_SUSPENDED)
106
- brightness = 0;
107
-
108
- return wm831x_backlight_set(bl, brightness);
94
+ return wm831x_backlight_set(bl, backlight_get_brightness(bl));
10995 }
11096
11197 static int wm831x_backlight_get_brightness(struct backlight_device *bl)