diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-02-21 19:43:33 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-21 20:22:23 -0500 |
commit | 8ec47063cc9951f376da696782d826ee0c207052 (patch) | |
tree | f30844b310ab9ee547e589a98cb73af4e4ceb11c /drivers/video/backlight | |
parent | 6006607843bd2a6f16dabeb029ed5f409ef195f5 (diff) |
backlight: ld9040: 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: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/backlight')
-rw-r--r-- | drivers/video/backlight/ld9040.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/video/backlight/ld9040.c b/drivers/video/backlight/ld9040.c index 12b5c01f5dcc..24f2c9aa10f1 100644 --- a/drivers/video/backlight/ld9040.c +++ b/drivers/video/backlight/ld9040.c | |||
@@ -755,7 +755,7 @@ static int ld9040_probe(struct spi_device *spi) | |||
755 | lcd->power = FB_BLANK_UNBLANK; | 755 | lcd->power = FB_BLANK_UNBLANK; |
756 | } | 756 | } |
757 | 757 | ||
758 | dev_set_drvdata(&spi->dev, lcd); | 758 | spi_set_drvdata(spi, lcd); |
759 | 759 | ||
760 | dev_info(&spi->dev, "ld9040 panel driver has been probed.\n"); | 760 | dev_info(&spi->dev, "ld9040 panel driver has been probed.\n"); |
761 | return 0; | 761 | return 0; |
@@ -770,7 +770,7 @@ out_free_regulator: | |||
770 | 770 | ||
771 | static int ld9040_remove(struct spi_device *spi) | 771 | static int ld9040_remove(struct spi_device *spi) |
772 | { | 772 | { |
773 | struct ld9040 *lcd = dev_get_drvdata(&spi->dev); | 773 | struct ld9040 *lcd = spi_get_drvdata(spi); |
774 | 774 | ||
775 | ld9040_power(lcd, FB_BLANK_POWERDOWN); | 775 | ld9040_power(lcd, FB_BLANK_POWERDOWN); |
776 | backlight_device_unregister(lcd->bd); | 776 | backlight_device_unregister(lcd->bd); |
@@ -783,7 +783,7 @@ static int ld9040_remove(struct spi_device *spi) | |||
783 | #if defined(CONFIG_PM) | 783 | #if defined(CONFIG_PM) |
784 | static int ld9040_suspend(struct spi_device *spi, pm_message_t mesg) | 784 | static int ld9040_suspend(struct spi_device *spi, pm_message_t mesg) |
785 | { | 785 | { |
786 | struct ld9040 *lcd = dev_get_drvdata(&spi->dev); | 786 | struct ld9040 *lcd = spi_get_drvdata(spi); |
787 | 787 | ||
788 | dev_dbg(&spi->dev, "lcd->power = %d\n", lcd->power); | 788 | dev_dbg(&spi->dev, "lcd->power = %d\n", lcd->power); |
789 | 789 | ||
@@ -796,7 +796,7 @@ static int ld9040_suspend(struct spi_device *spi, pm_message_t mesg) | |||
796 | 796 | ||
797 | static int ld9040_resume(struct spi_device *spi) | 797 | static int ld9040_resume(struct spi_device *spi) |
798 | { | 798 | { |
799 | struct ld9040 *lcd = dev_get_drvdata(&spi->dev); | 799 | struct ld9040 *lcd = spi_get_drvdata(spi); |
800 | 800 | ||
801 | lcd->power = FB_BLANK_POWERDOWN; | 801 | lcd->power = FB_BLANK_POWERDOWN; |
802 | 802 | ||
@@ -810,7 +810,7 @@ static int ld9040_resume(struct spi_device *spi) | |||
810 | /* Power down all displays on reboot, poweroff or halt. */ | 810 | /* Power down all displays on reboot, poweroff or halt. */ |
811 | static void ld9040_shutdown(struct spi_device *spi) | 811 | static void ld9040_shutdown(struct spi_device *spi) |
812 | { | 812 | { |
813 | struct ld9040 *lcd = dev_get_drvdata(&spi->dev); | 813 | struct ld9040 *lcd = spi_get_drvdata(spi); |
814 | 814 | ||
815 | ld9040_power(lcd, FB_BLANK_POWERDOWN); | 815 | ld9040_power(lcd, FB_BLANK_POWERDOWN); |
816 | } | 816 | } |