linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] rtc: rtc-ds1390/rtc-ds3234/rtc-m41t94: eliminate compile warning
@ 2011-03-18  0:02 Axel Lin
  0 siblings, 0 replies; 3+ messages in thread
From: Axel Lin @ 2011-03-18  0:02 UTC (permalink / raw)
  To: linux-kernel
  Cc: Dennis Aberilla, Dennis Aberilla, Mark Jackson, Kim B. Heino,
	Alessandro Zummo, Thomas Gleixner, rtc-linux

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: Axel Lin <axel.lin@gmail.com>
Cc: Mark Jackson <mpfj@mimc.co.uk>
Cc: Dennis Aberilla <denzzzhome@yahoo.com>
Cc: Kim B. Heino <Kim.Heino@bluegiga.com>
---
 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(-)

diff --git a/drivers/rtc/rtc-ds1390.c b/drivers/rtc/rtc-ds1390.c
index 26a86d2..b038d2c 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)
 
 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);
diff --git a/drivers/rtc/rtc-ds3234.c b/drivers/rtc/rtc-ds3234.c
index a774ca3..bbd2622 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)
 
 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;
diff --git a/drivers/rtc/rtc-m41t94.c b/drivers/rtc/rtc-m41t94.c
index c8c97a4..e259ed7 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)
 
 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);
-- 
1.7.1




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH v2] rtc: rtc-ds1390/rtc-ds3234/rtc-m41t94: eliminate compile warning
@ 2011-05-18  5:00 Dennis Aberilla
  2011-05-18  5:05 ` Axel Lin
  0 siblings, 1 reply; 3+ messages in thread
From: Dennis Aberilla @ 2011-05-18  5:00 UTC (permalink / raw)
  To: linux-kernel
  Cc: axel.lin, Mark Jackson, Kim B. Heino, Alessandro Zummo,
	Thomas Gleixner, rtc-linux

From: Axel Lin <axel.lin@gmail.com>

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: Axel Lin <axel.lin@gmail.com>
Signed-off by: Dennis Aberilla <denzzzhome@yahoo.com>
Cc: Mark Jackson <mpfj@mimc.co.uk>
Cc: Kim B. Heino <Kim.Heino@bluegiga.com>

---
 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(-)

diff --git a/drivers/rtc/rtc-ds1390.c b/drivers/rtc/rtc-ds1390.c
index 26a86d2..b038d2c 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)
 
 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);
diff --git a/drivers/rtc/rtc-ds3234.c b/drivers/rtc/rtc-ds3234.c
index a774ca3..bbd2622 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)
 
 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;
diff --git a/drivers/rtc/rtc-m41t94.c b/drivers/rtc/rtc-m41t94.c
index c8c97a4..e259ed7 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)
 
 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);

-- 

I'm happy with this. Thanks.

|Dennis





^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] rtc: rtc-ds1390/rtc-ds3234/rtc-m41t94: eliminate compile warning
  2011-05-18  5:00 [PATCH v2] rtc: rtc-ds1390/rtc-ds3234/rtc-m41t94: eliminate compile warning Dennis Aberilla
@ 2011-05-18  5:05 ` Axel Lin
  0 siblings, 0 replies; 3+ messages in thread
From: Axel Lin @ 2011-05-18  5:05 UTC (permalink / raw)
  To: Dennis Aberilla
  Cc: linux-kernel, Mark Jackson, Kim B. Heino, Alessandro Zummo,
	Thomas Gleixner, rtc-linux

hi Dennis,

2011/5/18 Dennis Aberilla <denzzzhome@yahoo.com>:
> From: Axel Lin <axel.lin@gmail.com>
>
> 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: Axel Lin <axel.lin@gmail.com>
> Signed-off by: Dennis Aberilla <denzzzhome@yahoo.com>
> Cc: Mark Jackson <mpfj@mimc.co.uk>
> Cc: Kim B. Heino <Kim.Heino@bluegiga.com>
>

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-05-18  5:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-18  5:00 [PATCH v2] rtc: rtc-ds1390/rtc-ds3234/rtc-m41t94: eliminate compile warning Dennis Aberilla
2011-05-18  5:05 ` Axel Lin
  -- strict thread matches above, loose matches on Subject: below --
2011-03-18  0:02 Axel Lin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).