staging: Use backlight power constants
Subsystems (3)
cover staging: Use backlight power constants
Commit a1cacb8a8e70 ("backlight: Add BACKLIGHT_POWER_ constants for power states") introduced dedicated constants for backlight power states. Convert staging drivers to the new constants.
The new constants replace the fbdev constants. This is part of a larger effort to make kernel subsystems more independent from fbdev code and headers.
Thomas Zimmermann (2):
staging: fbtft: Use backlight power constants
staging: olpc_dcon: Use backlight power constants
drivers/staging/fbtft/fb_ssd1351.c | 2 +- drivers/staging/fbtft/fbtft-core.c | 6 +++--- drivers/staging/olpc_dcon/olpc_dcon.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-)
Signature · 1 line
2.45.2
PATCH 1/2 staging: fbtft: 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 or semantics.
--- drivers/staging/fbtft/fb_ssd1351.c | 2 +- drivers/staging/fbtft/fbtft-core.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/staging/fbtft/fb_ssd1351.c +1 -1
@@ -213,7 +213,7 @@ static void register_onboard_backlight(struct fbtft_par *par)struct backlight_properties bl_props = {0 , }; bl_props.type =BACKLIGHT_RAW ; - bl_props.power =FB_BLANK_POWERDOWN ; + bl_props.power =BACKLIGHT_POWER_OFF ; bd = backlight_device_register(dev_driver_string(par->info->device), par->info->device, par, &bl_ops,
drivers/staging/fbtft/fbtft-core.c +3 -3
@@ -152,7 +152,7 @@ static int fbtft_backlight_get_brightness(struct backlight_device *bd)void fbtft_unregister_backlight (struct fbtft_par *par) {if (par->info->bl_dev) { - par->info->bl_dev->props.power =FB_BLANK_POWERDOWN ; + par->info->bl_dev->props.power =BACKLIGHT_POWER_OFF ;backlight_update_status (par->info->bl_dev);backlight_device_unregister (par->info->bl_dev); par->info->bl_dev =NULL ;
@@ -178,7 +178,7 @@ void fbtft_register_backlight(struct fbtft_par *par) bl_props.type =BACKLIGHT_RAW ;/* Assume backlight is off, get polarity from current state of pin */ - bl_props.power =FB_BLANK_POWERDOWN ; + bl_props.power =BACKLIGHT_POWER_OFF ;if (!gpiod_get_value (par->gpio.led[0 ])) par->polarity = true;
@@ -801,7 +801,7 @@ int fbtft_register_framebuffer(struct fb_info *fb_info)/* Turn on backlight if available */ if (fb_info->bl_dev) { - fb_info->bl_dev->props.power =FB_BLANK_UNBLANK ; + fb_info->bl_dev->props.power =BACKLIGHT_POWER_ON ; fb_info->bl_dev->ops->update_status (fb_info->bl_dev); }
Signature · 1 line
2.45.2
PATCH 2/2 staging: olpc_dcon: Use backlight power constants
In reply to Thomas ZimmermannReplace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality or semantics.
--- drivers/staging/olpc_dcon/olpc_dcon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/olpc_dcon/olpc_dcon.c +1 -1
@@ -544,7 +544,7 @@ static const struct backlight_ops dcon_bl_ops = {static struct backlight_properties dcon_bl_props = { .max_brightness =15 , .type =BACKLIGHT_RAW , - .power =FB_BLANK_UNBLANK , + .power =BACKLIGHT_POWER_ON , }; static int dcon_reboot_notify(struct notifier_block *nb,
Signature · 1 line
2.45.2