aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2011-03-17 09:47:56 -0400
committerGrant Likely <grant.likely@secretlab.ca>2011-03-17 12:32:47 -0400
commit42fea15d6dc410e62dac6a764142045280624a5b (patch)
tree195120f92cc8137952491116f89db1758c602517 /drivers/rtc
parentb1178b21c6b9721a07fbd50762067a7c0ffa5a50 (diff)
spi/rtc-{ds1390,ds3234,m41t94}: Use spi_get_drvdata() for SPI devices
The recently increased type checking in platform_get_drvdata() reveals a few offenders: drivers/rtc/rtc-ds1390.c:161: warning: passing argument 1 of ‘platform_get_drvdata’ from incompatible pointer type drivers/rtc/rtc-ds3234.c:161: warning: passing argument 1 of ‘platform_get_drvdata’ from incompatible pointer type drivers/rtc/rtc-m41t94.c:139: warning: passing argument 1 of ‘platform_get_drvdata’ from incompatible pointer type Use spi_get_drvdata() instead of platform_get_drvdata(). Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/rtc-ds1390.c2
-rw-r--r--drivers/rtc/rtc-ds3234.c2
-rw-r--r--drivers/rtc/rtc-m41t94.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/drivers/rtc/rtc-ds1390.c b/drivers/rtc/rtc-ds1390.c
index 26a86d235051..b038d2cfef26 100644
--- a/drivers/rtc/rtc-ds1390.c
+++ b/drivers/rtc/rtc-ds1390.c
@@ -158,7 +158,7 @@ static int __devinit ds1390_probe(struct spi_device *spi)
158 158
159static int __devexit ds1390_remove(struct spi_device *spi) 159static int __devexit ds1390_remove(struct spi_device *spi)
160{ 160{
161 struct ds1390 *chip = platform_get_drvdata(spi); 161 struct ds1390 *chip = spi_get_drvdata(spi);
162 162
163 rtc_device_unregister(chip->rtc); 163 rtc_device_unregister(chip->rtc);
164 kfree(chip); 164 kfree(chip);
diff --git a/drivers/rtc/rtc-ds3234.c b/drivers/rtc/rtc-ds3234.c
index a774ca35b5f7..bbd26228f532 100644
--- a/drivers/rtc/rtc-ds3234.c
+++ b/drivers/rtc/rtc-ds3234.c
@@ -158,7 +158,7 @@ static int __devinit ds3234_probe(struct spi_device *spi)
158 158
159static int __devexit ds3234_remove(struct spi_device *spi) 159static int __devexit ds3234_remove(struct spi_device *spi)
160{ 160{
161 struct rtc_device *rtc = platform_get_drvdata(spi); 161 struct rtc_device *rtc = spi_get_drvdata(spi);
162 162
163 rtc_device_unregister(rtc); 163 rtc_device_unregister(rtc);
164 return 0; 164 return 0;
diff --git a/drivers/rtc/rtc-m41t94.c b/drivers/rtc/rtc-m41t94.c
index c8c97a4169d4..e259ed76ae85 100644
--- a/drivers/rtc/rtc-m41t94.c
+++ b/drivers/rtc/rtc-m41t94.c
@@ -136,7 +136,7 @@ static int __devinit m41t94_probe(struct spi_device *spi)
136 136
137static int __devexit m41t94_remove(struct spi_device *spi) 137static int __devexit m41t94_remove(struct spi_device *spi)
138{ 138{
139 struct rtc_device *rtc = platform_get_drvdata(spi); 139 struct rtc_device *rtc = spi_get_drvdata(spi);
140 140
141 if (rtc) 141 if (rtc)
142 rtc_device_unregister(rtc); 142 rtc_device_unregister(rtc);