Skip to content

Commit e5dfbbd

Browse files
Thomas Zimmermannlag-linaro
authored andcommitted
backlight: tdo24m: 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 86c0826 commit e5dfbbd

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

drivers/video/backlight/tdo24m.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include <linux/lcd.h>
1717
#include <linux/slab.h>
1818

19-
#define POWER_IS_ON(pwr) ((pwr) <= FB_BLANK_NORMAL)
19+
#define POWER_IS_ON(pwr) ((pwr) <= LCD_POWER_REDUCED)
2020

2121
#define TDO24M_SPI_BUFF_SIZE (4)
2222
#define MODE_QVGA 0
@@ -354,7 +354,7 @@ static int tdo24m_probe(struct spi_device *spi)
354354
return -ENOMEM;
355355

356356
lcd->spi_dev = spi;
357-
lcd->power = FB_BLANK_POWERDOWN;
357+
lcd->power = LCD_POWER_OFF;
358358
lcd->mode = MODE_VGA; /* default to VGA */
359359

360360
lcd->buf = devm_kzalloc(&spi->dev, TDO24M_SPI_BUFF_SIZE, GFP_KERNEL);
@@ -390,7 +390,7 @@ static int tdo24m_probe(struct spi_device *spi)
390390
return PTR_ERR(lcd->lcd_dev);
391391

392392
spi_set_drvdata(spi, lcd);
393-
err = tdo24m_power(lcd, FB_BLANK_UNBLANK);
393+
err = tdo24m_power(lcd, LCD_POWER_ON);
394394
if (err)
395395
return err;
396396

@@ -401,22 +401,22 @@ static void tdo24m_remove(struct spi_device *spi)
401401
{
402402
struct tdo24m *lcd = spi_get_drvdata(spi);
403403

404-
tdo24m_power(lcd, FB_BLANK_POWERDOWN);
404+
tdo24m_power(lcd, LCD_POWER_OFF);
405405
}
406406

407407
#ifdef CONFIG_PM_SLEEP
408408
static int tdo24m_suspend(struct device *dev)
409409
{
410410
struct tdo24m *lcd = dev_get_drvdata(dev);
411411

412-
return tdo24m_power(lcd, FB_BLANK_POWERDOWN);
412+
return tdo24m_power(lcd, LCD_POWER_OFF);
413413
}
414414

415415
static int tdo24m_resume(struct device *dev)
416416
{
417417
struct tdo24m *lcd = dev_get_drvdata(dev);
418418

419-
return tdo24m_power(lcd, FB_BLANK_UNBLANK);
419+
return tdo24m_power(lcd, LCD_POWER_ON);
420420
}
421421
#endif
422422

@@ -427,7 +427,7 @@ static void tdo24m_shutdown(struct spi_device *spi)
427427
{
428428
struct tdo24m *lcd = spi_get_drvdata(spi);
429429

430-
tdo24m_power(lcd, FB_BLANK_POWERDOWN);
430+
tdo24m_power(lcd, LCD_POWER_OFF);
431431
}
432432

433433
static struct spi_driver tdo24m_driver = {

0 commit comments

Comments
 (0)