From patchwork Tue Nov 18 00:47:16 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alessandro Zummo X-Patchwork-Id: 9303 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from yx-out-2122.google.com (yx-out-2122.google.com [74.125.44.24]) by ozlabs.org (Postfix) with ESMTP id 4BBFFDDE1A for ; Tue, 18 Nov 2008 11:47:25 +1100 (EST) Received: by yx-out-2122.google.com with SMTP id 35so658602yxh.11 for ; Mon, 17 Nov 2008 16:47:23 -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=AKLx0oUHv3sx50e8GxXSOl0RuMQERxATGQP7DDHVejE=; b=aZBaks47/V8W4Ko02/+zYVGpY7hHHSijBOoiDLU4opR9LE1WcMMWwwPQOcWjbO/SY7 xuWabcKx24kP1py/YjZapAh7YkD53uSnwTWGY/DK+mLdC89jVOan2dtHNc7uMYLxJmNz PvP2xXLEi7Uq9lkbnxUBkHn14HNzBQcgk87+8= 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=0mKo8vlCdL2VOE28LF+6NdVLa6f7xASaxLuDo9C3wgrOkRUfdkUJYHFIWslnaTU3Gi 2vjcpEGr9KimMXrp4/SfpvdspzwzzporHEDfYWXhxStXFT0V+D03akQE1qKA1uzevYE9 isjUVD9CalQFBOcdiXINZ/rZNPhoE3LvUrfmQ= Received: by 10.150.49.11 with SMTP id w11mr297967ybw.16.1226969240651; Mon, 17 Nov 2008 16:47:20 -0800 (PST) Received: by 10.44.190.49 with SMTP id n49gr1625hsf.0; Mon, 17 Nov 2008 16:47:20 -0800 (PST) X-Sender: a.zummo@towertech.it X-Apparently-To: rtc-linux@googlegroups.com Received: by 10.151.103.2 with SMTP id f2mr2819777ybm.16.1226969239393; Mon, 17 Nov 2008 16:47:19 -0800 (PST) Received: from mx0.towertech.it (mx0.towertech.it [213.215.222.73]) by mx.google.com with SMTP id 7si4163456yxg.0.2008.11.17.16.47.18; Mon, 17 Nov 2008 16:47:18 -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 20838 invoked from network); 18 Nov 2008 01:47:17 +0100 Received: from unknown (HELO i1501.lan.towertech.it) (81.208.60.204) by mx0.towertech.it with SMTP; 18 Nov 2008 01:47:17 +0100 From: Alessandro Zummo Subject: [rtc-linux] [RFC PATCH] rtc: rtc-ep93xx fixes To: rtc-linux@googlegroups.com Cc: Alessandro Zummo , Lennert Buytenhek Date: Tue, 18 Nov 2008 01:47:16 +0100 Message-ID: <20081118004716.5655.33035.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 - added missing include - use platform_driver_probe - style issues Signed-off-by: Alessandro Zummo Cc: Lennert Buytenhek --- drivers/rtc/rtc-ep93xx.c | 25 ++++++++++--------------- 1 files changed, 10 insertions(+), 15 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-ep93xx.c b/drivers/rtc/rtc-ep93xx.c index f7a3283..c7f56e2 100644 --- a/drivers/rtc/rtc-ep93xx.c +++ b/drivers/rtc/rtc-ep93xx.c @@ -1,6 +1,6 @@ /* * A driver for the RTC embedded in the Cirrus Logic EP93XX processors - * Copyright (c) 2006 Tower Technologies + * Copyright (C) 2006-08 Tower Technologies * * Author: Alessandro Zummo * @@ -9,6 +9,7 @@ * published by the Free Software Foundation. */ +#include #include #include #include @@ -19,7 +20,7 @@ #define EP93XX_RTC_LOAD EP93XX_RTC_REG(0x000C) #define EP93XX_RTC_SWCOMP EP93XX_RTC_REG(0x0108) -#define DRV_VERSION "0.2" +#define DRV_VERSION "0.3" static int ep93xx_get_swcomp(struct device *dev, unsigned short *preload, unsigned short *delete) @@ -90,14 +91,13 @@ static ssize_t ep93xx_sysfs_show_comp_delete(struct device *dev, static DEVICE_ATTR(comp_delete, S_IRUGO, ep93xx_sysfs_show_comp_delete, NULL); -static int __devinit ep93xx_rtc_probe(struct platform_device *dev) +static int __init ep93xx_rtc_probe(struct platform_device *dev) { struct rtc_device *rtc = rtc_device_register("ep93xx", &dev->dev, &ep93xx_rtc_ops, THIS_MODULE); - if (IS_ERR(rtc)) { + if (IS_ERR(rtc)) return PTR_ERR(rtc); - } platform_set_drvdata(dev, rtc); @@ -107,33 +107,27 @@ static int __devinit ep93xx_rtc_probe(struct platform_device *dev) return 0; } -static int __devexit ep93xx_rtc_remove(struct platform_device *dev) +static int __exit ep93xx_rtc_remove(struct platform_device *dev) { struct rtc_device *rtc = platform_get_drvdata(dev); - if (rtc) - rtc_device_unregister(rtc); - + rtc_device_unregister(rtc); platform_set_drvdata(dev, NULL); return 0; } -/* work with hotplug and coldplug */ -MODULE_ALIAS("platform:ep93xx-rtc"); - static struct platform_driver ep93xx_rtc_platform_driver = { .driver = { .name = "ep93xx-rtc", .owner = THIS_MODULE, }, - .probe = ep93xx_rtc_probe, - .remove = __devexit_p(ep93xx_rtc_remove), + .remove = __exit_p(ep93xx_rtc_remove), }; static int __init ep93xx_rtc_init(void) { - return platform_driver_register(&ep93xx_rtc_platform_driver); + return platform_driver_probe(&ep93xx_rtc_platform_driver, ep93xx_rtc_probe); } static void __exit ep93xx_rtc_exit(void) @@ -145,6 +139,7 @@ MODULE_AUTHOR("Alessandro Zummo "); MODULE_DESCRIPTION("EP93XX RTC driver"); MODULE_LICENSE("GPL"); MODULE_VERSION(DRV_VERSION); +MODULE_ALIAS("platform:ep93xx-rtc"); module_init(ep93xx_rtc_init); module_exit(ep93xx_rtc_exit);