From patchwork Mon Nov 17 21:48:08 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alessandro Zummo X-Patchwork-Id: 9239 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from wa-out-1516.google.com (wa-out-1516.google.com [209.85.146.164]) by ozlabs.org (Postfix) with ESMTP id A8CBFDDDEA for ; Tue, 18 Nov 2008 08:48:17 +1100 (EST) Received: by wa-out-1516.google.com with SMTP id l32so2667862waf.1 for ; Mon, 17 Nov 2008 13:48:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=domainkey-signature:received:received:x-sender:x-apparently-to :received:received:received-spf:authentication-results:received :received:from:subject:to:cc:date:message-id:user-agent:mime-version :content-type:reply-to:sender:precedence:x-google-loop:mailing-list :list-id:list-post:list-help:list-unsubscribe:x-beenthere-env :x-beenthere; bh=qojvM31UwTGQmYZzDbE6POOIwH3LDCYn7DlM00ng6hM=; b=Pk8Jh8dknz3fhTzuKsUkxMbGNBdjQWYMQvuClcfFlbkxwa5mMTNBaS7JWIC08PTKfj afJy1EaGFgoJX/QPLr5Jh+WOFnq+Y47sPuFRQg6r0bxYj1RJGnWchFP2PnkB2eBNa/db mYFw114uCMLOCTaNW5YLgyhl5wUKyEwdLJ1+E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=x-sender:x-apparently-to:received-spf:authentication-results:from :subject:to:cc:date:message-id:user-agent:mime-version:content-type :reply-to:sender:precedence:x-google-loop:mailing-list:list-id :list-post:list-help:list-unsubscribe:x-beenthere-env:x-beenthere; b=mYaAX36YIyQfWSC3zxwE1puw1Pp4CnaZO5limrCRWwo80eq8iTIRX8daRmEsH95MnO 2nnjiC+nDq+bggrcSoxXtXTpI9Jx/f2Gyo8PGh8fNfmxtAvq08MrveO027uAgUitItHc RgMdNVFLHBebGNAuDnBgqKOCrzUDgOd+8E1KI= Received: by 10.141.137.3 with SMTP id p3mr267615rvn.17.1226958492734; Mon, 17 Nov 2008 13:48:12 -0800 (PST) Received: by 10.106.151.34 with SMTP id y34gr1617prd.0; Mon, 17 Nov 2008 13:48:12 -0800 (PST) X-Sender: a.zummo@towertech.it X-Apparently-To: rtc-linux@googlegroups.com Received: by 10.150.149.19 with SMTP id w19mr43070ybd.23.1226958491925; Mon, 17 Nov 2008 13:48:11 -0800 (PST) Received: from mx0.towertech.it (mx0.towertech.it [213.215.222.73]) by mx.google.com with SMTP id 39si4012192yxd.2.2008.11.17.13.48.10; Mon, 17 Nov 2008 13:48:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of a.zummo@towertech.it designates 213.215.222.73 as permitted sender) client-ip=213.215.222.73; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of a.zummo@towertech.it designates 213.215.222.73 as permitted sender) smtp.mail=a.zummo@towertech.it Received: (qmail 17400 invoked from network); 17 Nov 2008 22:48:09 +0100 Received: from unknown (HELO i1501.lan.towertech.it) (81.208.60.204) by mx0.towertech.it with SMTP; 17 Nov 2008 22:48:09 +0100 From: Alessandro Zummo Subject: [rtc-linux] [RFC PATCH] rtc: rtc-pl030 fixes To: rtc-linux@googlegroups.com Cc: Alessandro Zummo , Russell King Date: Mon, 17 Nov 2008 22:48:08 +0100 Message-ID: <20081117214808.24221.20669.stgit@i1501.lan.towertech.it> User-Agent: StGIT/0.14.2 Mime-Version: 1.0 Reply-To: rtc-linux@googlegroups.com Sender: rtc-linux@googlegroups.com Precedence: bulk X-Google-Loop: groups Mailing-List: list rtc-linux@googlegroups.com; contact rtc-linux+owner@googlegroups.com List-Id: List-Post: List-Help: List-Unsubscribe: , X-BeenThere-Env: rtc-linux@googlegroups.com X-BeenThere: rtc-linux@googlegroups.com - remove empty ioctl routine - use __devinit/__devexit Signed-off-by: Alessandro Zummo Cc: Russell King --- drivers/rtc/rtc-pl030.c | 21 +++++++-------------- 1 files changed, 7 insertions(+), 14 deletions(-) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to "rtc-linux". Membership options at http://groups.google.com/group/rtc-linux . Please read http://groups.google.com/group/rtc-linux/web/checklist before submitting a driver. -~----------~----~----~----~------~----~------~--~--- diff --git a/drivers/rtc/rtc-pl030.c b/drivers/rtc/rtc-pl030.c index 8261535..9c0c930 100644 --- a/drivers/rtc/rtc-pl030.c +++ b/drivers/rtc/rtc-pl030.c @@ -1,12 +1,13 @@ /* - * linux/drivers/rtc/rtc-pl030.c + * rtc-pl030.c * - * Copyright (C) 2000-2001 Deep Blue Solutions Ltd. + * Copyright (C) 2000-2001 Deep Blue Solutions Ltd. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ + #include #include #include @@ -34,11 +35,6 @@ static irqreturn_t pl030_interrupt(int irq, void *dev_id) return IRQ_HANDLED; } -static int pl030_ioctl(struct device *dev, unsigned int cmd, unsigned long arg) -{ - return -ENOIOCTLCMD; -} - static int pl030_read_alarm(struct device *dev, struct rtc_wkalrm *alrm) { struct pl030_rtc *rtc = dev_get_drvdata(dev); @@ -69,7 +65,6 @@ static int pl030_read_time(struct device *dev, struct rtc_time *tm) struct pl030_rtc *rtc = dev_get_drvdata(dev); rtc_time_to_tm(readl(rtc->base + RTC_DR), tm); - return 0; } @@ -95,14 +90,13 @@ static int pl030_set_time(struct device *dev, struct rtc_time *tm) } static const struct rtc_class_ops pl030_ops = { - .ioctl = pl030_ioctl, .read_time = pl030_read_time, .set_time = pl030_set_time, .read_alarm = pl030_read_alarm, .set_alarm = pl030_set_alarm, }; -static int pl030_probe(struct amba_device *dev, void *id) +static int __devinit pl030_probe(struct amba_device *dev, void *id) { struct pl030_rtc *rtc; int ret; @@ -154,16 +148,15 @@ static int pl030_probe(struct amba_device *dev, void *id) return ret; } -static int pl030_remove(struct amba_device *dev) +static int __devexit pl030_remove(struct amba_device *dev) { struct pl030_rtc *rtc = amba_get_drvdata(dev); - amba_set_drvdata(dev, NULL); - writel(0, rtc->base + RTC_CR); free_irq(dev->irq[0], rtc); rtc_device_unregister(rtc->rtc); + amba_set_drvdata(dev, NULL); iounmap(rtc->base); kfree(rtc); amba_release_regions(dev); @@ -184,7 +177,7 @@ static struct amba_driver pl030_driver = { .name = "rtc-pl030", }, .probe = pl030_probe, - .remove = pl030_remove, + .remove = __devexit_p(pl030_remove), .id_table = pl030_ids, };