Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20240731130130.1148153-2-tzimmermann@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Thomas Zimmermann and committed by
Greg Kroah-Hartman
0929391a 1ba70c69

+4 -4
+1 -1
drivers/staging/fbtft/fb_ssd1351.c
··· 210 210 struct backlight_properties bl_props = { 0, }; 211 211 212 212 bl_props.type = BACKLIGHT_RAW; 213 - bl_props.power = FB_BLANK_POWERDOWN; 213 + bl_props.power = BACKLIGHT_POWER_OFF; 214 214 215 215 bd = backlight_device_register(dev_driver_string(par->info->device), 216 216 par->info->device, par, &bl_ops,
+3 -3
drivers/staging/fbtft/fbtft-core.c
··· 152 152 void fbtft_unregister_backlight(struct fbtft_par *par) 153 153 { 154 154 if (par->info->bl_dev) { 155 - par->info->bl_dev->props.power = FB_BLANK_POWERDOWN; 155 + par->info->bl_dev->props.power = BACKLIGHT_POWER_OFF; 156 156 backlight_update_status(par->info->bl_dev); 157 157 backlight_device_unregister(par->info->bl_dev); 158 158 par->info->bl_dev = NULL; ··· 178 178 179 179 bl_props.type = BACKLIGHT_RAW; 180 180 /* Assume backlight is off, get polarity from current state of pin */ 181 - bl_props.power = FB_BLANK_POWERDOWN; 181 + bl_props.power = BACKLIGHT_POWER_OFF; 182 182 if (!gpiod_get_value(par->gpio.led[0])) 183 183 par->polarity = true; 184 184 ··· 799 799 800 800 /* Turn on backlight if available */ 801 801 if (fb_info->bl_dev) { 802 - fb_info->bl_dev->props.power = FB_BLANK_UNBLANK; 802 + fb_info->bl_dev->props.power = BACKLIGHT_POWER_ON; 803 803 fb_info->bl_dev->ops->update_status(fb_info->bl_dev); 804 804 } 805 805