forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-09 95099d4622f8cb224d94e314c7a8e0df60b13f87
kernel/drivers/video/backlight/locomolcd.c
....@@ -1,9 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Backlight control code for Sharp Zaurus SL-5500
34 *
45 * Copyright 2005 John Lenz <lenz@cs.wisc.edu>
56 * Maintainer: Pavel Machek <pavel@ucw.cz> (unless John wants to :-)
6
- * GPL v2
77 *
88 * This driver assumes single CPU. That's okay, because collie is
99 * slightly old hardware, and no one is going to retrofit second CPU to
....@@ -111,12 +111,8 @@
111111
112112 static int locomolcd_set_intensity(struct backlight_device *bd)
113113 {
114
- int intensity = bd->props.brightness;
114
+ int intensity = backlight_get_brightness(bd);
115115
116
- if (bd->props.power != FB_BLANK_UNBLANK)
117
- intensity = 0;
118
- if (bd->props.fb_blank != FB_BLANK_UNBLANK)
119
- intensity = 0;
120116 if (locomolcd_flags & LOCOMOLCD_SUSPENDED)
121117 intensity = 0;
122118