@@ -7,7 +7,6 @@
*/
#include <linux/delay.h>
-#include <linux/fb.h>
#include <linux/lcd.h>
#include <linux/module.h>
#include <linux/spi/spi.h>
@@ -205,7 +204,7 @@ static int lms501kf03_ldi_disable(struct lms501kf03 *lcd)
static int lms501kf03_power_is_on(int power)
{
- return (power) <= FB_BLANK_NORMAL;
+ return (power) <= LCD_POWER_REDUCED;
}
static int lms501kf03_power_on(struct lms501kf03 *lcd)
@@ -294,8 +293,8 @@ static int lms501kf03_set_power(struct lcd_device *ld, int power)
{
struct lms501kf03 *lcd = lcd_get_data(ld);
- if (power != FB_BLANK_UNBLANK && power != FB_BLANK_POWERDOWN &&
- power != FB_BLANK_NORMAL) {
+ if (power != LCD_POWER_ON && power != LCD_POWER_OFF &&
+ power != LCD_POWER_REDUCED) {
dev_err(lcd->dev, "power value should be 0, 1 or 4.\n");
return -EINVAL;
}
@@ -349,11 +348,11 @@ static int lms501kf03_probe(struct spi_device *spi)
* current lcd status is powerdown and then
* it enables lcd panel.
*/
- lcd->power = FB_BLANK_POWERDOWN;
+ lcd->power = LCD_POWER_OFF;
- lms501kf03_power(lcd, FB_BLANK_UNBLANK);
+ lms501kf03_power(lcd, LCD_POWER_ON);
} else {
- lcd->power = FB_BLANK_UNBLANK;
+ lcd->power = LCD_POWER_ON;
}
spi_set_drvdata(spi, lcd);
@@ -367,7 +366,7 @@ static void lms501kf03_remove(struct spi_device *spi)
{
struct lms501kf03 *lcd = spi_get_drvdata(spi);
- lms501kf03_power(lcd, FB_BLANK_POWERDOWN);
+ lms501kf03_power(lcd, LCD_POWER_OFF);
}
#ifdef CONFIG_PM_SLEEP
@@ -381,16 +380,16 @@ static int lms501kf03_suspend(struct device *dev)
* when lcd panel is suspend, lcd panel becomes off
* regardless of status.
*/
- return lms501kf03_power(lcd, FB_BLANK_POWERDOWN);
+ return lms501kf03_power(lcd, LCD_POWER_OFF);
}
static int lms501kf03_resume(struct device *dev)
{
struct lms501kf03 *lcd = dev_get_drvdata(dev);
- lcd->power = FB_BLANK_POWERDOWN;
+ lcd->power = LCD_POWER_OFF;
- return lms501kf03_power(lcd, FB_BLANK_UNBLANK);
+ return lms501kf03_power(lcd, LCD_POWER_ON);
}
#endif
@@ -401,7 +400,7 @@ static void lms501kf03_shutdown(struct spi_device *spi)
{
struct lms501kf03 *lcd = spi_get_drvdata(spi);
- lms501kf03_power(lcd, FB_BLANK_POWERDOWN);
+ lms501kf03_power(lcd, LCD_POWER_OFF);
}
static struct spi_driver lms501kf03_driver = {
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> --- drivers/video/backlight/lms501kf03.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-)