Skip to content

Commit a42a215

Browse files
tdzlag-linaro
authored andcommitted
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 <[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 7c323fb commit a42a215

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

drivers/video/backlight/ltv350qv.c

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
*/
77
#include <linux/delay.h>
88
#include <linux/err.h>
9-
#include <linux/fb.h>
109
#include <linux/init.h>
1110
#include <linux/lcd.h>
1211
#include <linux/module.h>
@@ -15,7 +14,7 @@
1514

1615
#include "ltv350qv.h"
1716

18-
#define POWER_IS_ON(pwr) ((pwr) <= FB_BLANK_NORMAL)
17+
#define POWER_IS_ON(pwr) ((pwr) <= LCD_POWER_REDUCED)
1918

2019
struct ltv350qv {
2120
struct spi_device *spi;
@@ -233,7 +232,7 @@ static int ltv350qv_probe(struct spi_device *spi)
233232
return -ENOMEM;
234233

235234
lcd->spi = spi;
236-
lcd->power = FB_BLANK_POWERDOWN;
235+
lcd->power = LCD_POWER_OFF;
237236
lcd->buffer = devm_kzalloc(&spi->dev, 8, GFP_KERNEL);
238237
if (!lcd->buffer)
239238
return -ENOMEM;
@@ -245,7 +244,7 @@ static int ltv350qv_probe(struct spi_device *spi)
245244

246245
lcd->ld = ld;
247246

248-
ret = ltv350qv_power(lcd, FB_BLANK_UNBLANK);
247+
ret = ltv350qv_power(lcd, LCD_POWER_ON);
249248
if (ret)
250249
return ret;
251250

@@ -258,22 +257,22 @@ static void ltv350qv_remove(struct spi_device *spi)
258257
{
259258
struct ltv350qv *lcd = spi_get_drvdata(spi);
260259

261-
ltv350qv_power(lcd, FB_BLANK_POWERDOWN);
260+
ltv350qv_power(lcd, LCD_POWER_OFF);
262261
}
263262

264263
#ifdef CONFIG_PM_SLEEP
265264
static int ltv350qv_suspend(struct device *dev)
266265
{
267266
struct ltv350qv *lcd = dev_get_drvdata(dev);
268267

269-
return ltv350qv_power(lcd, FB_BLANK_POWERDOWN);
268+
return ltv350qv_power(lcd, LCD_POWER_OFF);
270269
}
271270

272271
static int ltv350qv_resume(struct device *dev)
273272
{
274273
struct ltv350qv *lcd = dev_get_drvdata(dev);
275274

276-
return ltv350qv_power(lcd, FB_BLANK_UNBLANK);
275+
return ltv350qv_power(lcd, LCD_POWER_ON);
277276
}
278277
#endif
279278

@@ -284,7 +283,7 @@ static void ltv350qv_shutdown(struct spi_device *spi)
284283
{
285284
struct ltv350qv *lcd = spi_get_drvdata(spi);
286285

287-
ltv350qv_power(lcd, FB_BLANK_POWERDOWN);
286+
ltv350qv_power(lcd, LCD_POWER_OFF);
288287
}
289288

290289
static struct spi_driver ltv350qv_driver = {

0 commit comments

Comments
 (0)