drivers/auxdisplay/panel.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
From: Peng Fan <peng.fan@nxp.com>
Convert open-coded if/else with set_bit/clear_bit to the assign_bit API.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
drivers/auxdisplay/panel.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/auxdisplay/panel.c b/drivers/auxdisplay/panel.c
index a7dfc53157bc..2a567a075e2b 100644
--- a/drivers/auxdisplay/panel.c
+++ b/drivers/auxdisplay/panel.c
@@ -714,10 +714,7 @@ static void lcd_backlight(struct charlcd *charlcd, enum charlcd_onoff on)
/* The backlight is activated by setting the AUTOFEED line to +5V */
spin_lock_irq(&pprt_lock);
- if (on)
- set_bit(LCD_BIT_BL, bits);
- else
- clear_bit(LCD_BIT_BL, bits);
+ assign_bit(LCD_BIT_BL, bits, on);
panel_set_bits();
spin_unlock_irq(&pprt_lock);
}
--
2.51.0
On Fri, 18 Sep 2026 22:15:53 +0800, Peng Fan (OSS) wrote:
> Convert open-coded if/else with set_bit/clear_bit to the assign_bit API.
Applied, thanks!
[1/1] auxdisplay: panel: use assign_bit() where applicable
commit: ce7b04fb41e7dc1ab83732cbfde1cac860add7a8
Best regards,
--
With Best Regards,
Andy Shevchenko
On Fri, 18 Sept 2026 at 16:18, Peng Fan (OSS) <peng.fan@oss.nxp.com> wrote:
> From: Peng Fan <peng.fan@nxp.com>
>
> Convert open-coded if/else with set_bit/clear_bit to the assign_bit API.
>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
© 2016 - 2026 Red Hat, Inc.