Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 42fea15d authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Grant Likely
Browse files

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: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
parent b1178b21
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
+1 −1
Original line number Diff line number Diff line
@@ -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;
+1 −1
Original line number Diff line number Diff line
@@ -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);