Message ID | 20211030162901.17918-1-noralf@tronnes.org (mailing list archive) |
---|---|
State | Awaiting Upstream |
Headers | show |
Series | staging/fbtft: Fix backlight | expand |
Den 30.10.2021 18.29, skrev Noralf Trønnes: > Commit b4a1ed0cd18b ("fbdev: make FB_BACKLIGHT a tristate") forgot to > update fbtft breaking its backlight support when FB_BACKLIGHT is a module. > > Fix this by using IS_ENABLED(). > > Fixes: b4a1ed0cd18b ("fbdev: make FB_BACKLIGHT a tristate") > Cc: <stable@vger.kernel.org> > Signed-off-by: Noralf Trønnes <noralf@tronnes.org> > --- I discovered that fb_ssd1351 also has this #ifdef, so need to fix that as well. Will send a new version. Noralf.
diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c index ed992ca605eb..ff979f1eeee8 100644 --- a/drivers/staging/fbtft/fbtft-core.c +++ b/drivers/staging/fbtft/fbtft-core.c @@ -128,7 +128,7 @@ static int fbtft_request_gpios(struct fbtft_par *par) return 0; } -#ifdef CONFIG_FB_BACKLIGHT +#if IS_ENABLED(CONFIG_FB_BACKLIGHT) static int fbtft_backlight_update_status(struct backlight_device *bd) { struct fbtft_par *par = bl_get_data(bd); @@ -853,7 +853,7 @@ 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 +#if IS_ENABLED(CONFIG_FB_BACKLIGHT) /* Turn on backlight if available */ if (fb_info->bl_dev) { fb_info->bl_dev->props.power = FB_BLANK_UNBLANK;
Commit b4a1ed0cd18b ("fbdev: make FB_BACKLIGHT a tristate") forgot to update fbtft breaking its backlight support when FB_BACKLIGHT is a module. Fix this by using IS_ENABLED(). Fixes: b4a1ed0cd18b ("fbdev: make FB_BACKLIGHT a tristate") Cc: <stable@vger.kernel.org> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> --- drivers/staging/fbtft/fbtft-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)