* [PATCH] rtc-{ds1390,ds3234,m41t94}: Use spi_get_drvdata() for SPI devices
@ 2011-03-17 13:47 Geert Uytterhoeven
2011-03-17 16:34 ` Grant Likely
0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2011-03-17 13:47 UTC (permalink / raw)
To: Alessandro Zummo
Cc: rtc-linux, Andrew Morton, Linux Kernel Development, spi-devel-general
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>
---
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.0.4
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] rtc-{ds1390,ds3234,m41t94}: Use spi_get_drvdata() for SPI devices
2011-03-17 13:47 [PATCH] rtc-{ds1390,ds3234,m41t94}: Use spi_get_drvdata() for SPI devices Geert Uytterhoeven
@ 2011-03-17 16:34 ` Grant Likely
0 siblings, 0 replies; 2+ messages in thread
From: Grant Likely @ 2011-03-17 16:34 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Alessandro Zummo, rtc-linux, Andrew Morton,
Linux Kernel Development, spi-devel-general
On Thu, Mar 17, 2011 at 02:47:56PM +0100, Geert Uytterhoeven wrote:
> 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>
Obviously correct, thanks.
Merged.
g.
> ---
> 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.0.4
>
>
> Gr{oetje,eeting}s,
>
> Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
> -- Linus Torvalds
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-03-17 16:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-17 13:47 [PATCH] rtc-{ds1390,ds3234,m41t94}: Use spi_get_drvdata() for SPI devices Geert Uytterhoeven
2011-03-17 16:34 ` Grant Likely
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).