[PATCH] auxdisplay: panel: use assign_bit() where applicable

From: Peng Fan (OSS)

Date: Fri Sep 18 2026 - 10:33:57 EST


From: Peng Fan <peng.fan@xxxxxxx>

Convert open-coded if/else with set_bit/clear_bit to the assign_bit API.

Signed-off-by: Peng Fan <peng.fan@xxxxxxx>
---
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