Skip to content

Commit 20929e3

Browse files
tdzlag-linaro
authored andcommitted
backlight: corgi_lcd: 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 <[email protected]> Reviewed-by: Daniel Thompson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
1 parent 48ffe20 commit 20929e3

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

drivers/video/backlight/corgi_lcd.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#include <linux/slab.h>
2525
#include <asm/mach/sharpsl_param.h>
2626

27-
#define POWER_IS_ON(pwr) ((pwr) <= FB_BLANK_NORMAL)
27+
#define POWER_IS_ON(pwr) ((pwr) <= LCD_POWER_REDUCED)
2828

2929
/* Register Addresses */
3030
#define RESCTL_ADRS 0x00
@@ -455,7 +455,7 @@ static int corgi_lcd_suspend(struct device *dev)
455455

456456
corgibl_flags |= CORGIBL_SUSPENDED;
457457
corgi_bl_set_intensity(lcd, 0);
458-
corgi_lcd_set_power(lcd->lcd_dev, FB_BLANK_POWERDOWN);
458+
corgi_lcd_set_power(lcd->lcd_dev, LCD_POWER_OFF);
459459
return 0;
460460
}
461461

@@ -464,7 +464,7 @@ static int corgi_lcd_resume(struct device *dev)
464464
struct corgi_lcd *lcd = dev_get_drvdata(dev);
465465

466466
corgibl_flags &= ~CORGIBL_SUSPENDED;
467-
corgi_lcd_set_power(lcd->lcd_dev, FB_BLANK_UNBLANK);
467+
corgi_lcd_set_power(lcd->lcd_dev, LCD_POWER_ON);
468468
backlight_update_status(lcd->bl_dev);
469469
return 0;
470470
}
@@ -513,7 +513,7 @@ static int corgi_lcd_probe(struct spi_device *spi)
513513
if (IS_ERR(lcd->lcd_dev))
514514
return PTR_ERR(lcd->lcd_dev);
515515

516-
lcd->power = FB_BLANK_POWERDOWN;
516+
lcd->power = LCD_POWER_OFF;
517517
lcd->mode = (pdata) ? pdata->init_mode : CORGI_LCD_MODE_VGA;
518518

519519
memset(&props, 0, sizeof(struct backlight_properties));
@@ -535,7 +535,7 @@ static int corgi_lcd_probe(struct spi_device *spi)
535535
lcd->kick_battery = pdata->kick_battery;
536536

537537
spi_set_drvdata(spi, lcd);
538-
corgi_lcd_set_power(lcd->lcd_dev, FB_BLANK_UNBLANK);
538+
corgi_lcd_set_power(lcd->lcd_dev, LCD_POWER_ON);
539539
backlight_update_status(lcd->bl_dev);
540540

541541
lcd->limit_mask = pdata->limit_mask;
@@ -550,7 +550,7 @@ static void corgi_lcd_remove(struct spi_device *spi)
550550
lcd->bl_dev->props.power = BACKLIGHT_POWER_ON;
551551
lcd->bl_dev->props.brightness = 0;
552552
backlight_update_status(lcd->bl_dev);
553-
corgi_lcd_set_power(lcd->lcd_dev, FB_BLANK_POWERDOWN);
553+
corgi_lcd_set_power(lcd->lcd_dev, LCD_POWER_OFF);
554554
}
555555

556556
static struct spi_driver corgi_lcd_driver = {

0 commit comments

Comments
 (0)