[PATCH 04/28] backlight: corgi_lcd: Use lcd power constants
Thomas Zimmermann
tzimmermann at suse.de
Tue Aug 20 09:22:42 UTC 2024
Replace FB_BLANK_ constants with their counterparts from the
lcd subsystem. The values are identical, so there's no change
in functionality.
Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de>
---
drivers/video/backlight/corgi_lcd.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/video/backlight/corgi_lcd.c b/drivers/video/backlight/corgi_lcd.c
index e4fcfbe38dc6..35c3fd3281ca 100644
--- a/drivers/video/backlight/corgi_lcd.c
+++ b/drivers/video/backlight/corgi_lcd.c
@@ -24,7 +24,7 @@
#include <linux/slab.h>
#include <asm/mach/sharpsl_param.h>
-#define POWER_IS_ON(pwr) ((pwr) <= FB_BLANK_NORMAL)
+#define POWER_IS_ON(pwr) ((pwr) <= LCD_POWER_REDUCED)
/* Register Addresses */
#define RESCTL_ADRS 0x00
@@ -455,7 +455,7 @@ static int corgi_lcd_suspend(struct device *dev)
corgibl_flags |= CORGIBL_SUSPENDED;
corgi_bl_set_intensity(lcd, 0);
- corgi_lcd_set_power(lcd->lcd_dev, FB_BLANK_POWERDOWN);
+ corgi_lcd_set_power(lcd->lcd_dev, LCD_POWER_OFF);
return 0;
}
@@ -464,7 +464,7 @@ static int corgi_lcd_resume(struct device *dev)
struct corgi_lcd *lcd = dev_get_drvdata(dev);
corgibl_flags &= ~CORGIBL_SUSPENDED;
- corgi_lcd_set_power(lcd->lcd_dev, FB_BLANK_UNBLANK);
+ corgi_lcd_set_power(lcd->lcd_dev, LCD_POWER_ON);
backlight_update_status(lcd->bl_dev);
return 0;
}
@@ -513,7 +513,7 @@ static int corgi_lcd_probe(struct spi_device *spi)
if (IS_ERR(lcd->lcd_dev))
return PTR_ERR(lcd->lcd_dev);
- lcd->power = FB_BLANK_POWERDOWN;
+ lcd->power = LCD_POWER_OFF;
lcd->mode = (pdata) ? pdata->init_mode : CORGI_LCD_MODE_VGA;
memset(&props, 0, sizeof(struct backlight_properties));
@@ -535,7 +535,7 @@ static int corgi_lcd_probe(struct spi_device *spi)
lcd->kick_battery = pdata->kick_battery;
spi_set_drvdata(spi, lcd);
- corgi_lcd_set_power(lcd->lcd_dev, FB_BLANK_UNBLANK);
+ corgi_lcd_set_power(lcd->lcd_dev, LCD_POWER_ON);
backlight_update_status(lcd->bl_dev);
lcd->limit_mask = pdata->limit_mask;
@@ -550,7 +550,7 @@ static void corgi_lcd_remove(struct spi_device *spi)
lcd->bl_dev->props.power = BACKLIGHT_POWER_ON;
lcd->bl_dev->props.brightness = 0;
backlight_update_status(lcd->bl_dev);
- corgi_lcd_set_power(lcd->lcd_dev, FB_BLANK_POWERDOWN);
+ corgi_lcd_set_power(lcd->lcd_dev, LCD_POWER_OFF);
}
static struct spi_driver corgi_lcd_driver = {
--
2.46.0
More information about the dri-devel
mailing list