forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-02-20 e636c8d336489bf3eed5878299e6cc045bbad077
kernel/drivers/video/backlight/ep93xx_bl.c
....@@ -1,11 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Driver for the Cirrus EP93xx lcd backlight
34 *
45 * Copyright (c) 2010 H Hartley Sweeten <hsweeten@visionengravers.com>
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 * This driver controls the pulse width modulated brightness control output,
118 * BRIGHT, on the Cirrus EP9307, EP9312, and EP9315 processors.
....@@ -39,13 +36,7 @@
3936
4037 static int ep93xxbl_update_status(struct backlight_device *bl)
4138 {
42
- int brightness = bl->props.brightness;
43
-
44
- if (bl->props.power != FB_BLANK_UNBLANK ||
45
- bl->props.fb_blank != FB_BLANK_UNBLANK)
46
- brightness = 0;
47
-
48
- return ep93xxbl_set(bl, brightness);
39
+ return ep93xxbl_set(bl, backlight_get_brightness(bl));
4940 }
5041
5142 static int ep93xxbl_get_brightness(struct backlight_device *bl)