From patchwork Fri Mar 18 00:02:55 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Lin X-Patchwork-Id: 87447 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-yw0-f56.google.com (mail-yw0-f56.google.com [209.85.213.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 0A76FB6FA3 for ; Fri, 18 Mar 2011 11:03:08 +1100 (EST) Received: by ywc21 with SMTP id 21sf2568514ywc.11 for ; Thu, 17 Mar 2011 17:03:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=domainkey-signature:x-beenthere:received-spf:subject:from:to:cc :date:message-id:mime-version:x-mailer:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-google-group-id:list-post:list-help:list-archive:sender :list-subscribe:list-unsubscribe:content-type; bh=ijVsSC+OehDqnigRZlj7Wbp9/kL+hNe/JmLNJg52l/A=; b=KW1LpWkLKh1NIHgZEJ6q5ZqIDX0NpA0fgHKl1lqgAcqXVd8alGArZqS7T0qjUcKN9V GaoqV0l1OMWoWMtcCMz7yFtu3W0cwzVeyT5HblbWj+FYk5i4xBS67gjfaIQvy6Gf3Fnm GuO7PeNIDUiB19wi4+BlUa2zRAYaGdBp0PbzU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=x-beenthere:received-spf:subject:from:to:cc:date:message-id :mime-version:x-mailer:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-google-group-id:list-post:list-help:list-archive:sender :list-subscribe:list-unsubscribe:content-type; b=um5fDnUZ67KvbBhiq8XgjzH8oBb0P7grgSjb7Q0QcL6RZGj00HAkARh8MZAywsPWmo AIluCNXRXrQiezwXcQiYxZlqrT+o4JrO/q1u2MZpWt6SkMA8Au8cbcxnr6napoUfnP2O pa399wiCncX3sc6NIm1xMGYk92L/tQBmRxAww= Received: by 10.90.125.6 with SMTP id x6mr78234agc.43.1300406584535; Thu, 17 Mar 2011 17:03:04 -0700 (PDT) X-BeenThere: rtc-linux@googlegroups.com Received: by 10.231.2.82 with SMTP id 18ls2985648ibi.2.p; Thu, 17 Mar 2011 17:03:04 -0700 (PDT) Received: by 10.231.141.36 with SMTP id k36mr167657ibu.16.1300406584112; Thu, 17 Mar 2011 17:03:04 -0700 (PDT) Received: by 10.231.141.36 with SMTP id k36mr167656ibu.16.1300406584091; Thu, 17 Mar 2011 17:03:04 -0700 (PDT) Received: from mail-iy0-f169.google.com (mail-iy0-f169.google.com [209.85.210.169]) by gmr-mx.google.com with ESMTPS id m30si522695ibu.2.2011.03.17.17.03.04 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 17 Mar 2011 17:03:04 -0700 (PDT) Received-SPF: pass (google.com: domain of axel.lin@gmail.com designates 209.85.210.169 as permitted sender) client-ip=209.85.210.169; Received: by mail-iy0-f169.google.com with SMTP id 13so4698533iyf.14 for ; Thu, 17 Mar 2011 17:03:04 -0700 (PDT) Received: by 10.231.15.199 with SMTP id l7mr348984iba.131.1300406583844; Thu, 17 Mar 2011 17:03:03 -0700 (PDT) Received: from [59.112.80.129] (59-112-80-129.dynamic.hinet.net [59.112.80.129]) by mx.google.com with ESMTPS id 13sm924405ibo.8.2011.03.17.17.02.59 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 17 Mar 2011 17:03:02 -0700 (PDT) Subject: [rtc-linux] [PATCH v2] rtc: rtc-ds1390/rtc-ds3234/rtc-m41t94: eliminate compile warning From: Axel Lin To: linux-kernel@vger.kernel.org Cc: Dennis Aberilla , Dennis Aberilla , Mark Jackson , "Kim B. Heino" , Alessandro Zummo , Thomas Gleixner , rtc-linux@googlegroups.com Date: Fri, 18 Mar 2011 08:02:55 +0800 Message-ID: <1300406575.2241.5.camel@phoenix> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 X-Original-Sender: axel.lin@gmail.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of axel.lin@gmail.com designates 209.85.210.169 as permitted sender) smtp.mail=axel.lin@gmail.com; dkim=pass (test mode) header.i=@gmail.com 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: Sender: rtc-linux@googlegroups.com List-Subscribe: , List-Unsubscribe: , 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 Cc: Mark Jackson Cc: Dennis Aberilla Cc: Kim B. Heino --- 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);