mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 19:29:37 +00:00
staging/fbtft: Fix backlight
commit7865dd2493
upstream. Commitb4a1ed0cd1
("fbdev: make FB_BACKLIGHT a tristate") forgot to update fbtft breaking its backlight support when FB_BACKLIGHT is a module. Since FB_TFT selects FB_BACKLIGHT there's no need for this conditional so just remove it and we're good. Fixes:b4a1ed0cd1
("fbdev: make FB_BACKLIGHT a tristate") Cc: <stable@vger.kernel.org> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Link: https://lore.kernel.org/r/20211105204358.2991-1-noralf@tronnes.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
9b406e39e5
commit
e72e981d16
2 changed files with 1 additions and 12 deletions
|
@ -187,7 +187,6 @@ static struct fbtft_display display = {
|
|||
},
|
||||
};
|
||||
|
||||
#ifdef CONFIG_FB_BACKLIGHT
|
||||
static int update_onboard_backlight(struct backlight_device *bd)
|
||||
{
|
||||
struct fbtft_par *par = bl_get_data(bd);
|
||||
|
@ -231,9 +230,6 @@ static void register_onboard_backlight(struct fbtft_par *par)
|
|||
if (!par->fbtftops.unregister_backlight)
|
||||
par->fbtftops.unregister_backlight = fbtft_unregister_backlight;
|
||||
}
|
||||
#else
|
||||
static void register_onboard_backlight(struct fbtft_par *par) { };
|
||||
#endif
|
||||
|
||||
FBTFT_REGISTER_DRIVER(DRVNAME, "solomon,ssd1351", &display);
|
||||
|
||||
|
|
|
@ -136,7 +136,6 @@ static int fbtft_request_gpios_dt(struct fbtft_par *par)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_FB_BACKLIGHT
|
||||
static int fbtft_backlight_update_status(struct backlight_device *bd)
|
||||
{
|
||||
struct fbtft_par *par = bl_get_data(bd);
|
||||
|
@ -169,6 +168,7 @@ void fbtft_unregister_backlight(struct fbtft_par *par)
|
|||
par->info->bl_dev = NULL;
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(fbtft_unregister_backlight);
|
||||
|
||||
static const struct backlight_ops fbtft_bl_ops = {
|
||||
.get_brightness = fbtft_backlight_get_brightness,
|
||||
|
@ -206,12 +206,7 @@ void fbtft_register_backlight(struct fbtft_par *par)
|
|||
if (!par->fbtftops.unregister_backlight)
|
||||
par->fbtftops.unregister_backlight = fbtft_unregister_backlight;
|
||||
}
|
||||
#else
|
||||
void fbtft_register_backlight(struct fbtft_par *par) { };
|
||||
void fbtft_unregister_backlight(struct fbtft_par *par) { };
|
||||
#endif
|
||||
EXPORT_SYMBOL(fbtft_register_backlight);
|
||||
EXPORT_SYMBOL(fbtft_unregister_backlight);
|
||||
|
||||
static void fbtft_set_addr_win(struct fbtft_par *par, int xs, int ys, int xe,
|
||||
int ye)
|
||||
|
@ -860,13 +855,11 @@ int fbtft_register_framebuffer(struct fb_info *fb_info)
|
|||
fb_info->fix.smem_len >> 10, text1,
|
||||
HZ / fb_info->fbdefio->delay, text2);
|
||||
|
||||
#ifdef CONFIG_FB_BACKLIGHT
|
||||
/* Turn on backlight if available */
|
||||
if (fb_info->bl_dev) {
|
||||
fb_info->bl_dev->props.power = FB_BLANK_UNBLANK;
|
||||
fb_info->bl_dev->ops->update_status(fb_info->bl_dev);
|
||||
}
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue