From patchwork Thu Jan 15 23:46:52 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: dann frazier X-Patchwork-Id: 18882 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from yw-out-2122.google.com (yw-out-2122.google.com [74.125.46.25]) by ozlabs.org (Postfix) with ESMTP id 865A2DE376 for ; Fri, 16 Jan 2009 10:47:11 +1100 (EST) Received: by yw-out-2122.google.com with SMTP id 7so5303ywi.11 for ; Thu, 15 Jan 2009 15:47:09 -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:received:x-virus-scanned:received:received:received:from :to:cc:subject:date:message-id:x-mailer:in-reply-to:references :in-reply-to:references:reply-to:sender:precedence:x-google-loop :mailing-list:list-id:list-post:list-help:list-unsubscribe :x-beenthere-env:x-beenthere; bh=ApPzPrv+kcoLXW9XO8eXBO4ch7lsIdgewLJ+miCFaUo=; b=frIWfDn3ixHma+tPH/EMhga5ftfh9kLo5gUvSeXtUca7EkTdBUDC/gA/e7UWVMRo9e jGY172n0alRFyXszTDzOfrelpUxthqqscCnTw52ijS60YAsP4Rz9ovRZTGAKYcRg4fh5 4FtpmJP+MHXJicewE5dgJ6571myhk6q9yNBm4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=x-sender:x-apparently-to:received-spf:authentication-results :x-virus-scanned:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:reply-to:sender:precedence:x-google-loop :mailing-list:list-id:list-post:list-help:list-unsubscribe :x-beenthere-env:x-beenthere; b=6L7hzgvuzWekDePTPNH4Xtgf5Lk9RiHKLf8BBgXV/oozuDLEd/v2egkkjLEvPd8HsX I15QZfABPs0GugVfxzut5+60EBsvW1QlQoZUEjxe9zFScJvu/zKDqc05Oy7KCOrLlBdu sSZ7YwRcjDMVrlCImIcVuDgKaURgRXAh8+Ekw= Received: by 10.150.49.15 with SMTP id w15mr360790ybw.1.1232063226504; Thu, 15 Jan 2009 15:47:06 -0800 (PST) Received: by 10.176.6.40 with SMTP id 40gr1811yqf.0; Thu, 15 Jan 2009 15:47:06 -0800 (PST) X-Sender: dannf@ldl.fc.hp.com X-Apparently-To: rtc-linux@googlegroups.com Received: by 10.90.79.12 with SMTP id c12mr1268295agb.11.1232063226207; Thu, 15 Jan 2009 15:47:06 -0800 (PST) Received: from g1t0027.austin.hp.com (g1t0027.austin.hp.com [15.216.28.34]) by mx.google.com with ESMTP id 39si192340yxd.12.2009.01.15.15.47.06; Thu, 15 Jan 2009 15:47:06 -0800 (PST) Received-SPF: pass (google.com: domain of dannf@ldl.fc.hp.com designates 15.216.28.34 as permitted sender) client-ip=15.216.28.34; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dannf@ldl.fc.hp.com designates 15.216.28.34 as permitted sender) smtp.mail=dannf@ldl.fc.hp.com Received: from g5t0030.atlanta.hp.com (g5t0030.atlanta.hp.com [16.228.8.142]) by g1t0027.austin.hp.com (Postfix) with ESMTP id E0129385C6; Thu, 15 Jan 2009 23:47:05 +0000 (UTC) Received: from ldl.fc.hp.com (ldl.fc.hp.com [15.11.146.30]) by g5t0030.atlanta.hp.com (Postfix) with ESMTP id 5F90F24029; Thu, 15 Jan 2009 23:47:05 +0000 (UTC) Received: from localhost (ldl.fc.hp.com [127.0.0.1]) by ldl.fc.hp.com (Postfix) with ESMTP id DFB3039C094; Thu, 15 Jan 2009 16:47:04 -0700 (MST) X-Virus-Scanned: Debian amavisd-new at ldl.fc.hp.com Received: from ldl.fc.hp.com ([127.0.0.1]) by localhost (ldl.fc.hp.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qzU7vuzvwcRp; Thu, 15 Jan 2009 16:47:03 -0700 (MST) Received: from krebs (krebs.dannf [10.8.0.7]) by ldl.fc.hp.com (Postfix) with ESMTP id DA43039C07B; Thu, 15 Jan 2009 16:46:58 -0700 (MST) Received: by krebs (Postfix, from userid 20800) id AB2123B6926; Thu, 15 Jan 2009 16:46:57 -0700 (MST) From: dann frazier To: linux-parisc@vger.kernel.org, rtc-linux@googlegroups.com Cc: lkml@vger.kernel.org, kyle@mcmartin.ca, dann frazier Subject: [rtc-linux] [PATCH 5/9] Use platform_driver_probe Date: Thu, 15 Jan 2009 16:46:52 -0700 Message-Id: X-Mailer: git-send-email 1.5.6.5 In-Reply-To: <9b29163437fb37dc4996b17bcdb41192dbc79e9a.1231983599.git.dannf@hp.com> References: <5bda6a81bf9fa4a3b60253bca73ef629a6ccc629.1231983599.git.dannf@hp.com> <0c29db565874aae3a60172ad42635fb8f60e8369.1231983599.git.dannf@hp.com> <0c2b8df6ecd123038e8458eeb9924b7959a707fa.1231983599.git.dannf@hp.com> <9b29163437fb37dc4996b17bcdb41192dbc79e9a.1231983599.git.dannf@hp.com> In-Reply-To: References: 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 This isn't a hotpluggable device, so call platform_driver_probe directly in parisc_rtc_init Signed-off-by: dann frazier --- drivers/rtc/rtc-parisc.c | 12 +++--------- 1 files changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/rtc/rtc-parisc.c b/drivers/rtc/rtc-parisc.c index 0477cc1..a2ca07a 100644 --- a/drivers/rtc/rtc-parisc.c +++ b/drivers/rtc/rtc-parisc.c @@ -40,19 +40,14 @@ static const struct rtc_class_ops parisc_rtc_ops = { .set_time = parisc_set_time, }; -static int __devinit parisc_rtc_probe(struct platform_device *dev) +static int __init parisc_rtc_probe(struct platform_device *dev) { struct rtc_device *p; - p = kzalloc(sizeof (*p), GFP_KERNEL); - if (!p) - return -ENOMEM; - p = rtc_device_register("rtc-parisc", &dev->dev, &parisc_rtc_ops, THIS_MODULE); if (IS_ERR(p)) { int err = PTR_ERR(p); - kfree(p); return err; } @@ -61,12 +56,11 @@ static int __devinit parisc_rtc_probe(struct platform_device *dev) return 0; } -static int __devexit parisc_rtc_remove(struct platform_device *dev) +static int __exit parisc_rtc_remove(struct platform_device *dev) { struct rtc_device *p = platform_get_drvdata(dev); rtc_device_unregister(p); - kfree(p); return 0; } @@ -82,7 +76,7 @@ static struct platform_driver parisc_rtc_driver = { static int __init parisc_rtc_init(void) { - return platform_driver_register(&parisc_rtc_driver); + return platform_driver_probe(&parisc_rtc_driver, parisc_rtc_probe); } static void __exit parisc_rtc_fini(void)