Skip to content

Commit fef0b89

Browse files
skittlag-linaro
authored andcommitted
backlight: arcxcnn: Use backlight helper
Instead of retrieving the backlight brightness in struct backlight_properties manually, and then checking whether the backlight should be on at all, use backlight_get_brightness() which does all this and insulates this from future changes. Signed-off-by: Stephen Kitt <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Reviewed-by: Daniel Thompson <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 3a396f9 commit fef0b89

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

drivers/video/backlight/arcxcnn_bl.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,9 @@ static int arcxcnn_set_brightness(struct arcxcnn *lp, u32 brightness)
130130
static int arcxcnn_bl_update_status(struct backlight_device *bl)
131131
{
132132
struct arcxcnn *lp = bl_get_data(bl);
133-
u32 brightness = bl->props.brightness;
133+
u32 brightness = backlight_get_brightness(bl);
134134
int ret;
135135

136-
if (bl->props.state & (BL_CORE_SUSPENDED | BL_CORE_FBBLANK))
137-
brightness = 0;
138-
139136
ret = arcxcnn_set_brightness(lp, brightness);
140137
if (ret)
141138
return ret;

0 commit comments

Comments
 (0)