forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 072de836f53be56a70cecf70b43ae43b7ce17376
kernel/drivers/video/backlight/da903x_bl.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Backlight driver for Dialog Semiconductor DA9030/DA9034
34 *
....@@ -6,10 +7,6 @@
67 *
78 * Copyright (C) 2006-2008 Marvell International Ltd.
89 * Eric Miao <eric.miao@marvell.com>
9
- *
10
- * This program is free software; you can redistribute it and/or modify
11
- * it under the terms of the GNU General Public License version 2 as
12
- * published by the Free Software Foundation.
1310 */
1411
1512 #include <linux/kernel.h>
....@@ -80,18 +77,7 @@
8077
8178 static int da903x_backlight_update_status(struct backlight_device *bl)
8279 {
83
- int brightness = bl->props.brightness;
84
-
85
- if (bl->props.power != FB_BLANK_UNBLANK)
86
- brightness = 0;
87
-
88
- if (bl->props.fb_blank != FB_BLANK_UNBLANK)
89
- brightness = 0;
90
-
91
- if (bl->props.state & BL_CORE_SUSPENDED)
92
- brightness = 0;
93
-
94
- return da903x_backlight_set(bl, brightness);
80
+ return da903x_backlight_set(bl, backlight_get_brightness(bl));
9581 }
9682
9783 static int da903x_backlight_get_brightness(struct backlight_device *bl)