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

Configure Feed

Select the types of activity you want to include in your feed.

backlight: lms501kf03: 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-14-tzimmermann@suse.de
Signed-off-by: Lee Jones <lee@kernel.org>

authored by

Thomas Zimmermann and committed by
Lee Jones
7c323fb2 2576e64b

+11 -12
+11 -12
drivers/video/backlight/lms501kf03.c
··· 7 7 */ 8 8 9 9 #include <linux/delay.h> 10 - #include <linux/fb.h> 11 10 #include <linux/lcd.h> 12 11 #include <linux/module.h> 13 12 #include <linux/spi/spi.h> ··· 204 205 205 206 static int lms501kf03_power_is_on(int power) 206 207 { 207 - return (power) <= FB_BLANK_NORMAL; 208 + return (power) <= LCD_POWER_REDUCED; 208 209 } 209 210 210 211 static int lms501kf03_power_on(struct lms501kf03 *lcd) ··· 293 294 { 294 295 struct lms501kf03 *lcd = lcd_get_data(ld); 295 296 296 - if (power != FB_BLANK_UNBLANK && power != FB_BLANK_POWERDOWN && 297 - power != FB_BLANK_NORMAL) { 297 + if (power != LCD_POWER_ON && power != LCD_POWER_OFF && 298 + power != LCD_POWER_REDUCED) { 298 299 dev_err(lcd->dev, "power value should be 0, 1 or 4.\n"); 299 300 return -EINVAL; 300 301 } ··· 348 349 * current lcd status is powerdown and then 349 350 * it enables lcd panel. 350 351 */ 351 - lcd->power = FB_BLANK_POWERDOWN; 352 + lcd->power = LCD_POWER_OFF; 352 353 353 - lms501kf03_power(lcd, FB_BLANK_UNBLANK); 354 + lms501kf03_power(lcd, LCD_POWER_ON); 354 355 } else { 355 - lcd->power = FB_BLANK_UNBLANK; 356 + lcd->power = LCD_POWER_ON; 356 357 } 357 358 358 359 spi_set_drvdata(spi, lcd); ··· 366 367 { 367 368 struct lms501kf03 *lcd = spi_get_drvdata(spi); 368 369 369 - lms501kf03_power(lcd, FB_BLANK_POWERDOWN); 370 + lms501kf03_power(lcd, LCD_POWER_OFF); 370 371 } 371 372 372 373 #ifdef CONFIG_PM_SLEEP ··· 380 381 * when lcd panel is suspend, lcd panel becomes off 381 382 * regardless of status. 382 383 */ 383 - return lms501kf03_power(lcd, FB_BLANK_POWERDOWN); 384 + return lms501kf03_power(lcd, LCD_POWER_OFF); 384 385 } 385 386 386 387 static int lms501kf03_resume(struct device *dev) 387 388 { 388 389 struct lms501kf03 *lcd = dev_get_drvdata(dev); 389 390 390 - lcd->power = FB_BLANK_POWERDOWN; 391 + lcd->power = LCD_POWER_OFF; 391 392 392 - return lms501kf03_power(lcd, FB_BLANK_UNBLANK); 393 + return lms501kf03_power(lcd, LCD_POWER_ON); 393 394 } 394 395 #endif 395 396 ··· 400 401 { 401 402 struct lms501kf03 *lcd = spi_get_drvdata(spi); 402 403 403 - lms501kf03_power(lcd, FB_BLANK_POWERDOWN); 404 + lms501kf03_power(lcd, LCD_POWER_OFF); 404 405 } 405 406 406 407 static struct spi_driver lms501kf03_driver = {