backlight: pcf50633-backlight: Use backlight power constants
Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240624152033.25016-15-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
This commit is contained in:
parent
d4db2f1934
commit
eca6b3ddfc
@ -10,7 +10,6 @@
|
|||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
|
|
||||||
#include <linux/backlight.h>
|
#include <linux/backlight.h>
|
||||||
#include <linux/fb.h>
|
|
||||||
|
|
||||||
#include <linux/mfd/pcf50633/core.h>
|
#include <linux/mfd/pcf50633/core.h>
|
||||||
#include <linux/mfd/pcf50633/backlight.h>
|
#include <linux/mfd/pcf50633/backlight.h>
|
||||||
@ -53,7 +52,7 @@ static int pcf50633_bl_update_status(struct backlight_device *bl)
|
|||||||
|
|
||||||
|
|
||||||
if (bl->props.state & (BL_CORE_SUSPENDED | BL_CORE_FBBLANK) ||
|
if (bl->props.state & (BL_CORE_SUSPENDED | BL_CORE_FBBLANK) ||
|
||||||
bl->props.power != FB_BLANK_UNBLANK)
|
bl->props.power != BACKLIGHT_POWER_ON)
|
||||||
new_brightness = 0;
|
new_brightness = 0;
|
||||||
else if (bl->props.brightness < pcf_bl->brightness_limit)
|
else if (bl->props.brightness < pcf_bl->brightness_limit)
|
||||||
new_brightness = bl->props.brightness;
|
new_brightness = bl->props.brightness;
|
||||||
@ -106,7 +105,7 @@ static int pcf50633_bl_probe(struct platform_device *pdev)
|
|||||||
memset(&bl_props, 0, sizeof(bl_props));
|
memset(&bl_props, 0, sizeof(bl_props));
|
||||||
bl_props.type = BACKLIGHT_RAW;
|
bl_props.type = BACKLIGHT_RAW;
|
||||||
bl_props.max_brightness = 0x3f;
|
bl_props.max_brightness = 0x3f;
|
||||||
bl_props.power = FB_BLANK_UNBLANK;
|
bl_props.power = BACKLIGHT_POWER_ON;
|
||||||
|
|
||||||
if (pdata) {
|
if (pdata) {
|
||||||
bl_props.brightness = pdata->default_brightness;
|
bl_props.brightness = pdata->default_brightness;
|
||||||
|
Loading…
Reference in New Issue
Block a user