hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/video/backlight/88pm860x_bl.c
....@@ -1,12 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Backlight driver for Marvell Semiconductor 88PM8606
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>
....@@ -124,18 +121,7 @@
124121
125122 static int pm860x_backlight_update_status(struct backlight_device *bl)
126123 {
127
- int brightness = bl->props.brightness;
128
-
129
- if (bl->props.power != FB_BLANK_UNBLANK)
130
- brightness = 0;
131
-
132
- if (bl->props.fb_blank != FB_BLANK_UNBLANK)
133
- brightness = 0;
134
-
135
- if (bl->props.state & BL_CORE_SUSPENDED)
136
- brightness = 0;
137
-
138
- return pm860x_backlight_set(bl, brightness);
124
+ return pm860x_backlight_set(bl, backlight_get_brightness(bl));
139125 }
140126
141127 static int pm860x_backlight_get_brightness(struct backlight_device *bl)
....@@ -174,7 +160,7 @@
174160 return -ENODEV;
175161 }
176162 for_each_child_of_node(nproot, np) {
177
- if (!of_node_cmp(np->name, name)) {
163
+ if (of_node_name_eq(np, name)) {
178164 of_property_read_u32(np, "marvell,88pm860x-iset",
179165 &iset);
180166 data->iset = PM8606_WLED_CURRENT(iset);