From patchwork Thu Mar 17 13:47:56 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 87374 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-ww0-f56.google.com (mail-ww0-f56.google.com [74.125.82.56]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id 67DCAB6FE1 for ; Fri, 18 Mar 2011 00:48:06 +1100 (EST) Received: by wwb22 with SMTP id 22sf2855753wwb.11 for ; Thu, 17 Mar 2011 06:48:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=domainkey-signature:x-beenthere:received-spf:date:from:sender:to:cc :subject:message-id:user-agent:mime-version:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-google-group-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe:content-type :content-transfer-encoding; bh=+vxVaBd/2Yh1pqKV40G3+7voQoUA1TeGXss98rti0Q4=; b=DO3K2nTY/ewSDiRU6F8aFGfyiN1y1JBJAKthNjEgVtvizJXVtY6/tUhNIAvCcRkED+ /7jUe1wXiiHEVL6AWVuhCGrDE9LrsnifcP1vxkjrScqGGn2GQAKXbsfN5PI1AymF6gvg N3QfnEbY85vGKAxVltJzkofRz5OrOEYXIdjbM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=x-beenthere:received-spf:date:from:sender:to:cc:subject:message-id :user-agent:mime-version:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-google-group-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe:content-type :content-transfer-encoding; b=A8CQ5L1tflj4R3ySzE/2RBNSA9bpscMZ3F+F1hThIzFCuaeXUfLDeDSPlgGyOiUt0H ijQ90G5qKEK+g9Kz42ZzQd2g9A+63T4Y4nYO7Wcnl2GjCi58YKDp3M3nM9HyWLyM1g0Z rCW0UNPeGuXogxUUeF5GwzF3988RhYcl6hBzA= Received: by 10.216.65.1 with SMTP id e1mr166717wed.21.1300369681881; Thu, 17 Mar 2011 06:48:01 -0700 (PDT) X-BeenThere: rtc-linux@googlegroups.com Received: by 10.216.143.86 with SMTP id k64ls1323052wej.3.p; Thu, 17 Mar 2011 06:48:01 -0700 (PDT) Received: by 10.216.121.208 with SMTP id r58mr58202weh.10.1300369681381; Thu, 17 Mar 2011 06:48:01 -0700 (PDT) Received: by 10.216.121.208 with SMTP id r58mr58201weh.10.1300369681356; Thu, 17 Mar 2011 06:48:01 -0700 (PDT) Received: from georges.telenet-ops.be (georges.telenet-ops.be [195.130.137.68]) by gmr-mx.google.com with ESMTP id f14si986270wbu.1.2011.03.17.06.48.00; Thu, 17 Mar 2011 06:48:00 -0700 (PDT) Received-SPF: neutral (google.com: 195.130.137.68 is neither permitted nor denied by best guess record for domain of geert@linux-m68k.org) client-ip=195.130.137.68; Received: from ayla.of.borg ([84.193.80.148]) by georges.telenet-ops.be with bizsmtp id LDnx1g00d3C005g06DnxWr; Thu, 17 Mar 2011 14:48:00 +0100 Received: from geert (helo=localhost) by ayla.of.borg with local-esmtp (Exim 4.71) (envelope-from ) id 1Q0DYS-0006BI-Vc; Thu, 17 Mar 2011 14:47:57 +0100 Date: Thu, 17 Mar 2011 14:47:56 +0100 (CET) From: Geert Uytterhoeven Sender: rtc-linux@googlegroups.com To: Alessandro Zummo cc: rtc-linux@googlegroups.com, Andrew Morton , Linux Kernel Development , spi-devel-general@lists.sourceforge.net Subject: [rtc-linux] [PATCH] rtc-{ds1390, ds3234, m41t94}: Use spi_get_drvdata() for SPI devices Message-ID: User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 X-Original-Sender: geert@linux-m68k.org X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 195.130.137.68 is neither permitted nor denied by best guess record for domain of geert@linux-m68k.org) smtp.mail=geert@linux-m68k.org Reply-To: rtc-linux@googlegroups.com Precedence: list Mailing-list: list rtc-linux@googlegroups.com; contact rtc-linux+owners@googlegroups.com List-ID: X-Google-Group-Id: 712029733259 List-Post: , List-Help: , List-Archive: List-Subscribe: , List-Unsubscribe: , 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 --- 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);