Commit 91c665b0 authored by Jingoo Han's avatar Jingoo Han Committed by Linus Torvalds

backlight: ltv350qv: use spi_get_drvdata and spi_set_drvdata

Use the wrapper functions for getting and setting the driver data using
spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we
can directly pass a struct spi_device.
Signed-off-by: default avatarJingoo Han <jg1.han@samsung.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 7652c18d
...@@ -252,7 +252,7 @@ static int ltv350qv_probe(struct spi_device *spi) ...@@ -252,7 +252,7 @@ static int ltv350qv_probe(struct spi_device *spi)
if (ret) if (ret)
goto out_unregister; goto out_unregister;
dev_set_drvdata(&spi->dev, lcd); spi_set_drvdata(spi, lcd);
return 0; return 0;
...@@ -263,7 +263,7 @@ static int ltv350qv_probe(struct spi_device *spi) ...@@ -263,7 +263,7 @@ static int ltv350qv_probe(struct spi_device *spi)
static int ltv350qv_remove(struct spi_device *spi) static int ltv350qv_remove(struct spi_device *spi)
{ {
struct ltv350qv *lcd = dev_get_drvdata(&spi->dev); struct ltv350qv *lcd = spi_get_drvdata(spi);
ltv350qv_power(lcd, FB_BLANK_POWERDOWN); ltv350qv_power(lcd, FB_BLANK_POWERDOWN);
lcd_device_unregister(lcd->ld); lcd_device_unregister(lcd->ld);
...@@ -274,14 +274,14 @@ static int ltv350qv_remove(struct spi_device *spi) ...@@ -274,14 +274,14 @@ static int ltv350qv_remove(struct spi_device *spi)
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int ltv350qv_suspend(struct spi_device *spi, pm_message_t state) static int ltv350qv_suspend(struct spi_device *spi, pm_message_t state)
{ {
struct ltv350qv *lcd = dev_get_drvdata(&spi->dev); struct ltv350qv *lcd = spi_get_drvdata(spi);
return ltv350qv_power(lcd, FB_BLANK_POWERDOWN); return ltv350qv_power(lcd, FB_BLANK_POWERDOWN);
} }
static int ltv350qv_resume(struct spi_device *spi) static int ltv350qv_resume(struct spi_device *spi)
{ {
struct ltv350qv *lcd = dev_get_drvdata(&spi->dev); struct ltv350qv *lcd = spi_get_drvdata(spi);
return ltv350qv_power(lcd, FB_BLANK_UNBLANK); return ltv350qv_power(lcd, FB_BLANK_UNBLANK);
} }
...@@ -293,7 +293,7 @@ static int ltv350qv_resume(struct spi_device *spi) ...@@ -293,7 +293,7 @@ static int ltv350qv_resume(struct spi_device *spi)
/* Power down all displays on reboot, poweroff or halt */ /* Power down all displays on reboot, poweroff or halt */
static void ltv350qv_shutdown(struct spi_device *spi) static void ltv350qv_shutdown(struct spi_device *spi)
{ {
struct ltv350qv *lcd = dev_get_drvdata(&spi->dev); struct ltv350qv *lcd = spi_get_drvdata(spi);
ltv350qv_power(lcd, FB_BLANK_POWERDOWN); ltv350qv_power(lcd, FB_BLANK_POWERDOWN);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment