Commit 6be0fb64 authored by Thomas Zimmermann's avatar Thomas Zimmermann Committed by Lee Jones

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: default avatarThomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20240319093915.31778-5-tzimmermann@suse.deSigned-off-by: default avatarLee Jones <lee@kernel.org>
parent bf8c9550
...@@ -356,11 +356,7 @@ static int dsicm_bl_update_status(struct backlight_device *dev) ...@@ -356,11 +356,7 @@ static int dsicm_bl_update_status(struct backlight_device *dev)
static int dsicm_bl_get_intensity(struct backlight_device *dev) static int dsicm_bl_get_intensity(struct backlight_device *dev)
{ {
if (dev->props.fb_blank == FB_BLANK_UNBLANK && return backlight_get_brightness(dev);
dev->props.power == FB_BLANK_UNBLANK)
return dev->props.brightness;
return 0;
} }
static const struct backlight_ops dsicm_bl_ops = { static const struct backlight_ops dsicm_bl_ops = {
......
...@@ -340,11 +340,7 @@ static int acx565akm_bl_update_status(struct backlight_device *dev) ...@@ -340,11 +340,7 @@ static int acx565akm_bl_update_status(struct backlight_device *dev)
dev_dbg(&ddata->spi->dev, "%s\n", __func__); dev_dbg(&ddata->spi->dev, "%s\n", __func__);
if (dev->props.fb_blank == FB_BLANK_UNBLANK && level = backlight_get_brightness(dev);
dev->props.power == FB_BLANK_UNBLANK)
level = dev->props.brightness;
else
level = 0;
if (ddata->has_bc) if (ddata->has_bc)
acx565akm_set_brightness(ddata, level); acx565akm_set_brightness(ddata, level);
...@@ -363,8 +359,7 @@ static int acx565akm_bl_get_intensity(struct backlight_device *dev) ...@@ -363,8 +359,7 @@ static int acx565akm_bl_get_intensity(struct backlight_device *dev)
if (!ddata->has_bc) if (!ddata->has_bc)
return -ENODEV; return -ENODEV;
if (dev->props.fb_blank == FB_BLANK_UNBLANK && if (!backlight_is_blank(dev)) {
dev->props.power == FB_BLANK_UNBLANK) {
if (ddata->has_bc) if (ddata->has_bc)
return acx565akm_get_actual_brightness(ddata); return acx565akm_get_actual_brightness(ddata);
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment