rtc: rtc-ds1390/rtc-ds3234/rtc-m41t94: eliminate compile warning
PATCH v2 1/1 rtc: rtc-ds1390/rtc-ds3234/rtc-m41t94: eliminate compile warning
From: Axel Lin <[email protected]>
These drivers are registered as spi drivers, thus use spi_get_drvdata instead of platform_get_drvdata.
This patch eliminates the following compile warning:drivers/rtc/rtc-ds1390.c: In function 'ds1390_remove':drivers/rtc/rtc-ds1390.c:161: warning: passing argument 1 of 'platform_get_drvdata' from incompatible pointer type drivers/rtc/rtc-ds3234.c: In function 'ds3234_remove':drivers/rtc/rtc-ds3234.c:161: warning: passing argument 1 of 'platform_get_drvdata' from incompatible pointer type drivers/rtc/rtc-m41t94.c: In function 'm41t94_remove':drivers/rtc/rtc-m41t94.c:139: warning: passing argument 1 of 'platform_get_drvdata' from incompatible pointer type
Signed-off by: Dennis Aberilla <[email protected]>
Cc: Mark Jackson <[email protected]>
Cc: Kim B. Heino <[email protected]>
--- drivers/rtc/rtc-ds1390.c | 2 +- drivers/rtc/rtc-ds3234.c | 2 +- drivers/rtc/rtc-m41t94.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/rtc/rtc-ds1390.c +1 -1
@@ -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);
drivers/rtc/rtc-ds3234.c +1 -1
@@ -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;
drivers/rtc/rtc-m41t94.c +1 -1
@@ -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);
Signature · 3 lines
I'm happy with this. Thanks. |Dennis
hi Dennis,
2011/5/18 Dennis Aberilla <[email protected]>:
Quoted 13 lines
From: Axel Lin <[email protected]>
These drivers are registered as spi drivers, thus use
spi_get_drvdatainstead ofplatform_get_drvdata.This patch eliminates the following compile warning:
drivers/rtc/rtc-ds1390.c: In function 'ds1390_remove':drivers/rtc/rtc-ds1390.c:161: warning: passing argument 1 of 'platform_get_drvdata' from incompatible pointer typedrivers/rtc/rtc-ds3234.c: In function 'ds3234_remove':drivers/rtc/rtc-ds3234.c:161: warning: passing argument 1 of 'platform_get_drvdata' from incompatible pointer typedrivers/rtc/rtc-m41t94.c: In function 'm41t94_remove':drivers/rtc/rtc-m41t94.c:139: warning: passing argument 1 of 'platform_get_drvdata' from incompatible pointer type
Quoted 5 lines
Signed-off-by Axel Lin <[email protected]>Signed-off by: Dennis Aberilla <[email protected]>
Cc: Mark Jackson <[email protected]>
Cc: Kim B. Heino <[email protected]>
Just FYI.
A similar patch "spi/rtc-{ds1390,ds3234,m41t94}: Use spi_get_drvdata() for SPI devices"
from Geert Uytterhoeven is already merged to linux-next.
Regards,
Axel