aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-02-21 19:43:39 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-02-21 20:22:23 -0500
commitc7855f15e2bed7a35edecc3ebcaa445ea8a57848 (patch)
tree80688bfb408c1b4d917f06c8ddcf9c6e3b771ada
parentb936fab023210398aa5846feb5af25f3cd33a52f (diff)
backlight: ams369fg06: 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>
-rw-r--r--drivers/video/backlight/ams369fg06.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/video/backlight/ams369fg06.c b/drivers/video/backlight/ams369fg06.c
index 72d71e085d77..bd8a32002200 100644
--- a/drivers/video/backlight/ams369fg06.c
+++ b/drivers/video/backlight/ams369fg06.c
@@ -513,7 +513,7 @@ static int ams369fg06_probe(struct spi_device *spi)
513 lcd->power = FB_BLANK_UNBLANK; 513 lcd->power = FB_BLANK_UNBLANK;
514 } 514 }
515 515
516 dev_set_drvdata(&spi->dev, lcd); 516 spi_set_drvdata(spi, lcd);
517 517
518 dev_info(&spi->dev, "ams369fg06 panel driver has been probed.\n"); 518 dev_info(&spi->dev, "ams369fg06 panel driver has been probed.\n");
519 519
@@ -526,7 +526,7 @@ out_lcd_unregister:
526 526
527static int ams369fg06_remove(struct spi_device *spi) 527static int ams369fg06_remove(struct spi_device *spi)
528{ 528{
529 struct ams369fg06 *lcd = dev_get_drvdata(&spi->dev); 529 struct ams369fg06 *lcd = spi_get_drvdata(spi);
530 530
531 ams369fg06_power(lcd, FB_BLANK_POWERDOWN); 531 ams369fg06_power(lcd, FB_BLANK_POWERDOWN);
532 backlight_device_unregister(lcd->bd); 532 backlight_device_unregister(lcd->bd);
@@ -538,7 +538,7 @@ static int ams369fg06_remove(struct spi_device *spi)
538#if defined(CONFIG_PM) 538#if defined(CONFIG_PM)
539static int ams369fg06_suspend(struct spi_device *spi, pm_message_t mesg) 539static int ams369fg06_suspend(struct spi_device *spi, pm_message_t mesg)
540{ 540{
541 struct ams369fg06 *lcd = dev_get_drvdata(&spi->dev); 541 struct ams369fg06 *lcd = spi_get_drvdata(spi);
542 542
543 dev_dbg(&spi->dev, "lcd->power = %d\n", lcd->power); 543 dev_dbg(&spi->dev, "lcd->power = %d\n", lcd->power);
544 544
@@ -551,7 +551,7 @@ static int ams369fg06_suspend(struct spi_device *spi, pm_message_t mesg)
551 551
552static int ams369fg06_resume(struct spi_device *spi) 552static int ams369fg06_resume(struct spi_device *spi)
553{ 553{
554 struct ams369fg06 *lcd = dev_get_drvdata(&spi->dev); 554 struct ams369fg06 *lcd = spi_get_drvdata(spi);
555 555
556 lcd->power = FB_BLANK_POWERDOWN; 556 lcd->power = FB_BLANK_POWERDOWN;
557 557
@@ -564,7 +564,7 @@ static int ams369fg06_resume(struct spi_device *spi)
564 564
565static void ams369fg06_shutdown(struct spi_device *spi) 565static void ams369fg06_shutdown(struct spi_device *spi)
566{ 566{
567 struct ams369fg06 *lcd = dev_get_drvdata(&spi->dev); 567 struct ams369fg06 *lcd = spi_get_drvdata(spi);
568 568
569 ams369fg06_power(lcd, FB_BLANK_POWERDOWN); 569 ams369fg06_power(lcd, FB_BLANK_POWERDOWN);
570} 570}