diff options
| -rw-r--r-- | Documentation/ABI/testing/sysfs-auxdisplay-linedisp | 9 | ||||
| -rw-r--r-- | drivers/auxdisplay/arm-charlcd.c | 7 | ||||
| -rw-r--r-- | drivers/auxdisplay/panel.c | 5 |
3 files changed, 9 insertions, 12 deletions
diff --git a/Documentation/ABI/testing/sysfs-auxdisplay-linedisp b/Documentation/ABI/testing/sysfs-auxdisplay-linedisp index 55f1b559e84e..ac9e96448b96 100644 --- a/Documentation/ABI/testing/sysfs-auxdisplay-linedisp +++ b/Documentation/ABI/testing/sysfs-auxdisplay-linedisp @@ -11,7 +11,8 @@ Description: Writing an empty string clears the display. - Example: + Example:: + echo "Hello World" > message cat message # Returns "Hello World\n" @@ -23,7 +24,8 @@ Description: Read-only attribute showing the character width capacity of the line display device. Messages longer than this will scroll. - Example: + Example:: + cat num_chars # Returns "16\n" for 16-char display What: /sys/.../scroll_step_ms @@ -35,7 +37,8 @@ Description: Setting to 0 disables scrolling. Default is 500ms. - Example: + Example:: + echo "250" > scroll_step_ms # 4Hz scrolling cat scroll_step_ms # Returns "250\n" diff --git a/drivers/auxdisplay/arm-charlcd.c b/drivers/auxdisplay/arm-charlcd.c index 70efda4f767e..ea684f3446c3 100644 --- a/drivers/auxdisplay/arm-charlcd.c +++ b/drivers/auxdisplay/arm-charlcd.c @@ -306,10 +306,7 @@ static int charlcd_resume(struct device *dev) return 0; } -static const struct dev_pm_ops charlcd_pm_ops = { - .suspend = charlcd_suspend, - .resume = charlcd_resume, -}; +static DEFINE_SIMPLE_DEV_PM_OPS(charlcd_pm_ops, charlcd_suspend, charlcd_resume); static const struct of_device_id charlcd_match[] = { { .compatible = "arm,versatile-lcd", }, @@ -319,7 +316,7 @@ static const struct of_device_id charlcd_match[] = { static struct platform_driver charlcd_driver = { .driver = { .name = DRIVERNAME, - .pm = &charlcd_pm_ops, + .pm = pm_sleep_ptr(&charlcd_pm_ops), .suppress_bind_attrs = true, .of_match_table = charlcd_match, }, 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); } |
