forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-14 bedbef8ad3e75a304af6361af235302bcc61d06b
kernel/drivers/video/backlight/max8925_bl.c
....@@ -1,12 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Backlight driver for Maxim MAX8925
34 *
45 * Copyright (C) 2009 Marvell International Ltd.
56 * Haojian Zhuang <haojian.zhuang@marvell.com>
6
- *
7
- * This program is free software; you can redistribute it and/or modify
8
- * it under the terms of the GNU General Public License version 2 as
9
- * published by the Free Software Foundation.
107 */
118
129 #include <linux/init.h>
....@@ -67,18 +64,7 @@
6764
6865 static int max8925_backlight_update_status(struct backlight_device *bl)
6966 {
70
- int brightness = bl->props.brightness;
71
-
72
- if (bl->props.power != FB_BLANK_UNBLANK)
73
- brightness = 0;
74
-
75
- if (bl->props.fb_blank != FB_BLANK_UNBLANK)
76
- brightness = 0;
77
-
78
- if (bl->props.state & BL_CORE_SUSPENDED)
79
- brightness = 0;
80
-
81
- return max8925_backlight_set(bl, brightness);
67
+ return max8925_backlight_set(bl, backlight_get_brightness(bl));
8268 }
8369
8470 static int max8925_backlight_get_brightness(struct backlight_device *bl)