.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Sanyo LV5207LP LED Driver |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (C) 2013 Ideas on board SPRL |
---|
5 | 6 | * |
---|
6 | 7 | * Contact: Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
---|
7 | | - * |
---|
8 | | - * This program is free software; you can redistribute it and/or modify |
---|
9 | | - * it under the terms of the GNU General Public License version 2 as |
---|
10 | | - * published by the Free Software Foundation. |
---|
11 | 8 | */ |
---|
12 | 9 | |
---|
13 | 10 | #include <linux/backlight.h> |
---|
.. | .. |
---|
49 | 46 | static int lv5207lp_backlight_update_status(struct backlight_device *backlight) |
---|
50 | 47 | { |
---|
51 | 48 | struct lv5207lp *lv = bl_get_data(backlight); |
---|
52 | | - int brightness = backlight->props.brightness; |
---|
53 | | - |
---|
54 | | - if (backlight->props.power != FB_BLANK_UNBLANK || |
---|
55 | | - backlight->props.fb_blank != FB_BLANK_UNBLANK || |
---|
56 | | - backlight->props.state & (BL_CORE_SUSPENDED | BL_CORE_FBBLANK)) |
---|
57 | | - brightness = 0; |
---|
| 49 | + int brightness = backlight_get_brightness(backlight); |
---|
58 | 50 | |
---|
59 | 51 | if (brightness) { |
---|
60 | 52 | lv5207lp_write(lv, LV5207LP_CTRL1, |
---|
.. | .. |
---|
75 | 67 | { |
---|
76 | 68 | struct lv5207lp *lv = bl_get_data(backlight); |
---|
77 | 69 | |
---|
78 | | - return lv->pdata->fbdev == NULL || lv->pdata->fbdev == info->dev; |
---|
| 70 | + return lv->pdata->fbdev == NULL || lv->pdata->fbdev == info->device; |
---|
79 | 71 | } |
---|
80 | 72 | |
---|
81 | 73 | static const struct backlight_ops lv5207lp_backlight_ops = { |
---|