]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
backlight: corgi_lcd: Use lcd power constants
authorThomas Zimmermann <tzimmermann@suse.de>
Fri, 6 Sep 2024 07:52:18 +0000 (09:52 +0200)
committerLee Jones <lee@kernel.org>
Mon, 30 Sep 2024 15:49:41 +0000 (16:49 +0100)
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@suse.de>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Link: https://lore.kernel.org/r/20240906075439.98476-5-tzimmermann@suse.de
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/video/backlight/corgi_lcd.c

index e4fcfbe38dc65904dfe8edd3792f80c9acd61e6d..35c3fd3281ca51f99b43cbec7087dc0d8ba121aa 100644 (file)
@@ -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 = {