backlight: ltv350qv: Use lcd power constants
authorThomas Zimmermann <tzimmermann@suse.de>
Fri, 6 Sep 2024 07:52:28 +0000 (09:52 +0200)
committerLee Jones <lee@kernel.org>
Mon, 30 Sep 2024 15:49:42 +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-15-tzimmermann@suse.de
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/video/backlight/ltv350qv.c

index cdc4c08..c919b0f 100644 (file)
@@ -6,7 +6,6 @@
  */
 #include <linux/delay.h>
 #include <linux/err.h>
-#include <linux/fb.h>
 #include <linux/init.h>
 #include <linux/lcd.h>
 #include <linux/module.h>
@@ -15,7 +14,7 @@
 
 #include "ltv350qv.h"
 
-#define POWER_IS_ON(pwr)       ((pwr) <= FB_BLANK_NORMAL)
+#define POWER_IS_ON(pwr)       ((pwr) <= LCD_POWER_REDUCED)
 
 struct ltv350qv {
        struct spi_device       *spi;
@@ -233,7 +232,7 @@ static int ltv350qv_probe(struct spi_device *spi)
                return -ENOMEM;
 
        lcd->spi = spi;
-       lcd->power = FB_BLANK_POWERDOWN;
+       lcd->power = LCD_POWER_OFF;
        lcd->buffer = devm_kzalloc(&spi->dev, 8, GFP_KERNEL);
        if (!lcd->buffer)
                return -ENOMEM;
@@ -245,7 +244,7 @@ static int ltv350qv_probe(struct spi_device *spi)
 
        lcd->ld = ld;
 
-       ret = ltv350qv_power(lcd, FB_BLANK_UNBLANK);
+       ret = ltv350qv_power(lcd, LCD_POWER_ON);
        if (ret)
                return ret;
 
@@ -258,7 +257,7 @@ static void ltv350qv_remove(struct spi_device *spi)
 {
        struct ltv350qv *lcd = spi_get_drvdata(spi);
 
-       ltv350qv_power(lcd, FB_BLANK_POWERDOWN);
+       ltv350qv_power(lcd, LCD_POWER_OFF);
 }
 
 #ifdef CONFIG_PM_SLEEP
@@ -266,14 +265,14 @@ static int ltv350qv_suspend(struct device *dev)
 {
        struct ltv350qv *lcd = dev_get_drvdata(dev);
 
-       return ltv350qv_power(lcd, FB_BLANK_POWERDOWN);
+       return ltv350qv_power(lcd, LCD_POWER_OFF);
 }
 
 static int ltv350qv_resume(struct device *dev)
 {
        struct ltv350qv *lcd = dev_get_drvdata(dev);
 
-       return ltv350qv_power(lcd, FB_BLANK_UNBLANK);
+       return ltv350qv_power(lcd, LCD_POWER_ON);
 }
 #endif
 
@@ -284,7 +283,7 @@ static void ltv350qv_shutdown(struct spi_device *spi)
 {
        struct ltv350qv *lcd = spi_get_drvdata(spi);
 
-       ltv350qv_power(lcd, FB_BLANK_POWERDOWN);
+       ltv350qv_power(lcd, LCD_POWER_OFF);
 }
 
 static struct spi_driver ltv350qv_driver = {