Skip to content

Commit 6be0fb6

Browse files
Thomas Zimmermannlag-linaro
authored andcommitted
fbdev: omap2/omapfb: Replace use of fb_blank with backlight helpers
Replace the use of struct backlight_properties.fb_blank with backlight helpers. This effects testing if the backlight is blanked and reading the backlight's brightness level. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Dan Carpenter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
1 parent bf8c955 commit 6be0fb6

File tree

2 files changed

+3
-12
lines changed

2 files changed

+3
-12
lines changed

drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -356,11 +356,7 @@ static int dsicm_bl_update_status(struct backlight_device *dev)
356356

357357
static int dsicm_bl_get_intensity(struct backlight_device *dev)
358358
{
359-
if (dev->props.fb_blank == FB_BLANK_UNBLANK &&
360-
dev->props.power == FB_BLANK_UNBLANK)
361-
return dev->props.brightness;
362-
363-
return 0;
359+
return backlight_get_brightness(dev);
364360
}
365361

366362
static const struct backlight_ops dsicm_bl_ops = {

drivers/video/fbdev/omap2/omapfb/displays/panel-sony-acx565akm.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -340,11 +340,7 @@ static int acx565akm_bl_update_status(struct backlight_device *dev)
340340

341341
dev_dbg(&ddata->spi->dev, "%s\n", __func__);
342342

343-
if (dev->props.fb_blank == FB_BLANK_UNBLANK &&
344-
dev->props.power == FB_BLANK_UNBLANK)
345-
level = dev->props.brightness;
346-
else
347-
level = 0;
343+
level = backlight_get_brightness(dev);
348344

349345
if (ddata->has_bc)
350346
acx565akm_set_brightness(ddata, level);
@@ -363,8 +359,7 @@ static int acx565akm_bl_get_intensity(struct backlight_device *dev)
363359
if (!ddata->has_bc)
364360
return -ENODEV;
365361

366-
if (dev->props.fb_blank == FB_BLANK_UNBLANK &&
367-
dev->props.power == FB_BLANK_UNBLANK) {
362+
if (!backlight_is_blank(dev)) {
368363
if (ddata->has_bc)
369364
return acx565akm_get_actual_brightness(ddata);
370365
else

0 commit comments

Comments
 (0)