summaryrefslogtreecommitdiff
path: root/drivers/video/backlight/lv5207lp.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2020-08-11 23:48:02 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2020-08-11 23:48:02 +0300
commit96f970feeb47003a8eba967f188bba4e75875c7a (patch)
tree22523f58dbcf69d1e1866c01cbfc3d05b64ad1cc /drivers/video/backlight/lv5207lp.c
parentc636eef2ee3696f261a35f34989842701a107895 (diff)
parent7eb99a39ef767644bbfd2b3f12f139d13e3ee8b3 (diff)
downloadlinux-96f970feeb47003a8eba967f188bba4e75875c7a.tar.xz
Merge tag 'backlight-next-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight
Pull backlight updates from Lee Jones: "Core Framework: - Trivial: Code refactoring - New API backlight_is_blank() - New API backlight_get_brightness() - Additional/reworked documentation - Remove 'extern' labels from prototypes - Drop backlight_put() - Staticify of_find_backlight() Driver Removal: - Removal of unused OT200 driver - Removal of unused Generic Backlight driver Fix-ups - Bunch of W=1 warning fixes - Convert to GPIO descriptors; sky81452 - Move platform data handling into driver; sky81452 - Remove superfluous code; lms501kf03 - Many instances of using new APIs" * tag 'backlight-next-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight: (34 commits) video: backlight: cr_bllcd: Remove unused variable 'intensity' backlight: backlight: Make of_find_backlight static backlight: backlight: Drop backlight_put() backlight: Use backlight_get_brightness() throughout backlight: jornada720_bl: Introduce backlight_is_blank() backlight: gpio_backlight: Simplify update_status() backlight: cr_bllcd: Introduce gpio-backlight semantics backlight: as3711_bl: Simplify update_status backlight: backlight: Introduce backlight_get_brightness() doc-rst: Wire-up Backlight kernel-doc documentation backlight: backlight: Add overview and update existing doc backlight: backlight: Drop extern from prototypes backlight: generic_bl: Remove this driver as it is unused backlight: backlight: Document enums in backlight.h backlight: backlight: Document inline functions in backlight.h backlight: backlight: Improve backlight_device documentation backlight: backlight: Improve backlight_properties documentation backlight: backlight: Improve backlight_ops documentation backlight: backlight: Add backlight_is_blank() backlight: backlight: Refactor fb_notifier_callback() ...
Diffstat (limited to 'drivers/video/backlight/lv5207lp.c')
-rw-r--r--drivers/video/backlight/lv5207lp.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/video/backlight/lv5207lp.c b/drivers/video/backlight/lv5207lp.c
index c6ad73a784e2..1842ae9a55f8 100644
--- a/drivers/video/backlight/lv5207lp.c
+++ b/drivers/video/backlight/lv5207lp.c
@@ -46,12 +46,7 @@ static int lv5207lp_write(struct lv5207lp *lv, u8 reg, u8 data)
static int lv5207lp_backlight_update_status(struct backlight_device *backlight)
{
struct lv5207lp *lv = bl_get_data(backlight);
- int brightness = backlight->props.brightness;
-
- if (backlight->props.power != FB_BLANK_UNBLANK ||
- backlight->props.fb_blank != FB_BLANK_UNBLANK ||
- backlight->props.state & (BL_CORE_SUSPENDED | BL_CORE_FBBLANK))
- brightness = 0;
+ int brightness = backlight_get_brightness(backlight);
if (brightness) {
lv5207lp_write(lv, LV5207LP_CTRL1,