Commit 1b8d2834 authored by Jingoo Han's avatar Jingoo Han Committed by Linus Torvalds

backlight: vgg2432a4: 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 c7855f15
...@@ -208,12 +208,11 @@ static int vgg2432a4_lcd_init(struct ili9320 *lcd, ...@@ -208,12 +208,11 @@ static int vgg2432a4_lcd_init(struct ili9320 *lcd,
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int vgg2432a4_suspend(struct spi_device *spi, pm_message_t state) static int vgg2432a4_suspend(struct spi_device *spi, pm_message_t state)
{ {
return ili9320_suspend(dev_get_drvdata(&spi->dev), state); return ili9320_suspend(spi_get_drvdata(spi), state);
} }
static int vgg2432a4_resume(struct spi_device *spi) static int vgg2432a4_resume(struct spi_device *spi)
{ {
return ili9320_resume(dev_get_drvdata(&spi->dev)); return ili9320_resume(spi_get_drvdata(spi));
} }
#else #else
#define vgg2432a4_suspend NULL #define vgg2432a4_suspend NULL
...@@ -242,12 +241,12 @@ static int vgg2432a4_probe(struct spi_device *spi) ...@@ -242,12 +241,12 @@ static int vgg2432a4_probe(struct spi_device *spi)
static int vgg2432a4_remove(struct spi_device *spi) static int vgg2432a4_remove(struct spi_device *spi)
{ {
return ili9320_remove(dev_get_drvdata(&spi->dev)); return ili9320_remove(spi_get_drvdata(spi));
} }
static void vgg2432a4_shutdown(struct spi_device *spi) static void vgg2432a4_shutdown(struct spi_device *spi)
{ {
ili9320_shutdown(dev_get_drvdata(&spi->dev)); ili9320_shutdown(spi_get_drvdata(spi));
} }
static struct spi_driver vgg2432a4_driver = { static struct spi_driver vgg2432a4_driver = {
......
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