Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

backlight: ltv350qv: Use lcd power constants

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>

authored by

Thomas Zimmermann and committed by
Lee Jones
a42a215d 7c323fb2

+7 -8
+7 -8
drivers/video/backlight/ltv350qv.c
··· 6 6 */ 7 7 #include <linux/delay.h> 8 8 #include <linux/err.h> 9 - #include <linux/fb.h> 10 9 #include <linux/init.h> 11 10 #include <linux/lcd.h> 12 11 #include <linux/module.h> ··· 14 15 15 16 #include "ltv350qv.h" 16 17 17 - #define POWER_IS_ON(pwr) ((pwr) <= FB_BLANK_NORMAL) 18 + #define POWER_IS_ON(pwr) ((pwr) <= LCD_POWER_REDUCED) 18 19 19 20 struct ltv350qv { 20 21 struct spi_device *spi; ··· 232 233 return -ENOMEM; 233 234 234 235 lcd->spi = spi; 235 - lcd->power = FB_BLANK_POWERDOWN; 236 + lcd->power = LCD_POWER_OFF; 236 237 lcd->buffer = devm_kzalloc(&spi->dev, 8, GFP_KERNEL); 237 238 if (!lcd->buffer) 238 239 return -ENOMEM; ··· 244 245 245 246 lcd->ld = ld; 246 247 247 - ret = ltv350qv_power(lcd, FB_BLANK_UNBLANK); 248 + ret = ltv350qv_power(lcd, LCD_POWER_ON); 248 249 if (ret) 249 250 return ret; 250 251 ··· 257 258 { 258 259 struct ltv350qv *lcd = spi_get_drvdata(spi); 259 260 260 - ltv350qv_power(lcd, FB_BLANK_POWERDOWN); 261 + ltv350qv_power(lcd, LCD_POWER_OFF); 261 262 } 262 263 263 264 #ifdef CONFIG_PM_SLEEP ··· 265 266 { 266 267 struct ltv350qv *lcd = dev_get_drvdata(dev); 267 268 268 - return ltv350qv_power(lcd, FB_BLANK_POWERDOWN); 269 + return ltv350qv_power(lcd, LCD_POWER_OFF); 269 270 } 270 271 271 272 static int ltv350qv_resume(struct device *dev) 272 273 { 273 274 struct ltv350qv *lcd = dev_get_drvdata(dev); 274 275 275 - return ltv350qv_power(lcd, FB_BLANK_UNBLANK); 276 + return ltv350qv_power(lcd, LCD_POWER_ON); 276 277 } 277 278 #endif 278 279 ··· 283 284 { 284 285 struct ltv350qv *lcd = spi_get_drvdata(spi); 285 286 286 - ltv350qv_power(lcd, FB_BLANK_POWERDOWN); 287 + ltv350qv_power(lcd, LCD_POWER_OFF); 287 288 } 288 289 289 290 static struct spi_driver ltv350qv_driver = {