Skip to content

Commit

Permalink
fbdev: omap2/omapfb: Replace use of fb_blank with backlight helpers
Browse files Browse the repository at this point in the history
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 <tzimmermann@suse.de>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20240319093915.31778-5-tzimmermann@suse.de
Signed-off-by: Lee Jones <lee@kernel.org>
  • Loading branch information
Thomas Zimmermann authored and Lee Jones committed Mar 28, 2024
1 parent bf8c955 commit 6be0fb6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
6 changes: 1 addition & 5 deletions drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,11 +356,7 @@ static int dsicm_bl_update_status(struct backlight_device *dev)

static int dsicm_bl_get_intensity(struct backlight_device *dev)
{
if (dev->props.fb_blank == FB_BLANK_UNBLANK &&
dev->props.power == FB_BLANK_UNBLANK)
return dev->props.brightness;

return 0;
return backlight_get_brightness(dev);
}

static const struct backlight_ops dsicm_bl_ops = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,11 +340,7 @@ static int acx565akm_bl_update_status(struct backlight_device *dev)

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

if (dev->props.fb_blank == FB_BLANK_UNBLANK &&
dev->props.power == FB_BLANK_UNBLANK)
level = dev->props.brightness;
else
level = 0;
level = backlight_get_brightness(dev);

if (ddata->has_bc)
acx565akm_set_brightness(ddata, level);
Expand All @@ -363,8 +359,7 @@ static int acx565akm_bl_get_intensity(struct backlight_device *dev)
if (!ddata->has_bc)
return -ENODEV;

if (dev->props.fb_blank == FB_BLANK_UNBLANK &&
dev->props.power == FB_BLANK_UNBLANK) {
if (!backlight_is_blank(dev)) {
if (ddata->has_bc)
return acx565akm_get_actual_brightness(ddata);
else
Expand Down

0 comments on commit 6be0fb6

Please sign in to comment.