spi/rtc-{ds1390,ds3234,m41t94}: Use spi_get_drvdata() for SPI devices
authorGeert Uytterhoeven <geert@linux-m68k.org>
Thu, 17 Mar 2011 13:47:56 +0000 (14:47 +0100)
committerGrant Likely <grant.likely@secretlab.ca>
Thu, 17 Mar 2011 16:32:47 +0000 (10:32 -0600)
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>
drivers/rtc/rtc-ds1390.c
drivers/rtc/rtc-ds3234.c
drivers/rtc/rtc-m41t94.c

index 26a86d235051ff283115c34324ae2605a860a42f..b038d2cfef267163699fb502a4c3d2d533a58e75 100644 (file)
@@ -158,7 +158,7 @@ static int __devinit ds1390_probe(struct spi_device *spi)
 
 static int __devexit ds1390_remove(struct spi_device *spi)
 {
-       struct ds1390 *chip = platform_get_drvdata(spi);
+       struct ds1390 *chip = spi_get_drvdata(spi);
 
        rtc_device_unregister(chip->rtc);
        kfree(chip);
index a774ca35b5f728540f8895f435f0c3d878af6f06..bbd26228f5326f337e86af8c624736d5c9c82ede 100644 (file)
@@ -158,7 +158,7 @@ static int __devinit ds3234_probe(struct spi_device *spi)
 
 static int __devexit ds3234_remove(struct spi_device *spi)
 {
-       struct rtc_device *rtc = platform_get_drvdata(spi);
+       struct rtc_device *rtc = spi_get_drvdata(spi);
 
        rtc_device_unregister(rtc);
        return 0;
index c8c97a4169d4e22e46ed3aa6a7b0a72fa65ec4ba..e259ed76ae856d5b2cc8f354522f39e70d5474dc 100644 (file)
@@ -136,7 +136,7 @@ static int __devinit m41t94_probe(struct spi_device *spi)
 
 static int __devexit m41t94_remove(struct spi_device *spi)
 {
-       struct rtc_device *rtc = platform_get_drvdata(spi);
+       struct rtc_device *rtc = spi_get_drvdata(spi);
 
        if (rtc)
                rtc_device_unregister(rtc);