From patchwork Sat Mar 9 18:09:47 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laxman Dewangan X-Patchwork-Id: 226352 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-ob0-x237.google.com (mail-ob0-x237.google.com [IPv6:2607:f8b0:4003:c01::237]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id E1DAC2C034A for ; Sun, 10 Mar 2013 05:12:21 +1100 (EST) Received: by mail-ob0-f183.google.com with SMTP id un3sf785022obb.0 for ; Sat, 09 Mar 2013 10:12:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=x-received:x-beenthere:x-received:received-spf:x-pgp-universal:from :to:cc:subject:date:message-id:x-mailer:in-reply-to:references :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:sender:list-subscribe :list-unsubscribe:content-type; bh=IQUmrc5KDPl8dSps1rDb1v3oTt3o1e7kyIYyJQK2IwM=; b=Lk2L63CsWVuJv/I+dCX4d2ypIpAhvOPS6MAeu0l+JxZ0Wpyzu62xsPuufSaGf2iAxS GiFFt8mt0aPUmis4frUbNsbTm4gD0XLGYhcVcdROKLoM8ktjUkDDhR0HIXovHb0B2Liq IawLunTslxiPLfbZMSuytbulTlNrj4VoM37Y9sDOUBAi8Wj9jfdSIIzLQd89XhnvrrXl mxD4sCwO7x1qXQPEaFfcVlHsTXEfAryhJV46RqZLaxiX7SlyLUvDcnVcWZ+YbsRqpMmS hRyH15sCurAYaQ/E0mcBArUL4+pOSYTYksLTnWe5T95l8RcMyVD/QRUpG/pumFN3ivpJ TzEg== X-Received: by 10.50.151.205 with SMTP id us13mr366338igb.2.1362852738937; Sat, 09 Mar 2013 10:12:18 -0800 (PST) X-BeenThere: rtc-linux@googlegroups.com Received: by 10.50.213.42 with SMTP id np10ls469703igc.32.gmail; Sat, 09 Mar 2013 10:12:18 -0800 (PST) X-Received: by 10.68.138.165 with SMTP id qr5mr3271673pbb.8.1362852738657; Sat, 09 Mar 2013 10:12:18 -0800 (PST) Received: from hqemgate03.nvidia.com (hqemgate03.nvidia.com. [216.228.121.140]) by gmr-mx.google.com with ESMTPS id tj3si2872395pbc.0.2013.03.09.10.12.18 (version=TLSv1 cipher=RC4-SHA bits=128/128); Sat, 09 Mar 2013 10:12:18 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of ldewangan@nvidia.com designates 216.228.121.140 as permitted sender) client-ip=216.228.121.140; Received: from hqnvupgp08.nvidia.com (Not Verified[216.228.121.13]) by hqemgate03.nvidia.com id ; Sat, 09 Mar 2013 10:16:59 -0800 Received: from hqemhub01.nvidia.com ([172.17.108.22]) by hqnvupgp08.nvidia.com (PGP Universal service); Sat, 09 Mar 2013 10:05:32 -0800 X-PGP-Universal: processed; by hqnvupgp08.nvidia.com on Sat, 09 Mar 2013 10:05:32 -0800 Received: from hqnvemgw02.nvidia.com (172.16.227.111) by hqemhub01.nvidia.com (172.20.150.30) with Microsoft SMTP Server id 8.3.298.1; Sat, 9 Mar 2013 10:11:49 -0800 Received: from daphne.nvidia.com (Not Verified[172.16.212.96]) by hqnvemgw02.nvidia.com with MailMarshal (v7,1,2,5326) id ; Sat, 09 Mar 2013 10:11:49 -0800 Received: from ldewangan-ubuntu.nvidia.com ([10.19.65.30]) by daphne.nvidia.com (8.13.8+Sun/8.8.8) with ESMTP id r29IBcU7026785; Sat, 9 Mar 2013 10:11:47 -0800 (PST) From: Laxman Dewangan To: , CC: , , , , Laxman Dewangan Subject: [rtc-linux] [PATCH 3/5] rtc: tegra: use module_platform_driver_probe for module init/exit Date: Sat, 9 Mar 2013 23:39:47 +0530 Message-ID: <1362852588-13362-4-git-send-email-ldewangan@nvidia.com> X-Mailer: git-send-email 1.7.1.1 In-Reply-To: <1362852588-13362-1-git-send-email-ldewangan@nvidia.com> References: <1362852588-13362-1-git-send-email-ldewangan@nvidia.com> MIME-Version: 1.0 X-Original-Sender: ldewangan@nvidia.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: best guess record for domain of ldewangan@nvidia.com designates 216.228.121.140 as permitted sender) smtp.mail=ldewangan@nvidia.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: , Use macro module_platform_driver_probe() to reduce some of the boilerplate code in the driver. Signed-off-by: Laxman Dewangan Reviewed-by: Thierry Reding --- drivers/rtc/rtc-tegra.c | 12 +----------- 1 files changed, 1 insertions(+), 11 deletions(-) diff --git a/drivers/rtc/rtc-tegra.c b/drivers/rtc/rtc-tegra.c index f7718de..4cba10d 100644 --- a/drivers/rtc/rtc-tegra.c +++ b/drivers/rtc/rtc-tegra.c @@ -451,17 +451,7 @@ static struct platform_driver tegra_rtc_driver = { }, }; -static int __init tegra_rtc_init(void) -{ - return platform_driver_probe(&tegra_rtc_driver, tegra_rtc_probe); -} -module_init(tegra_rtc_init); - -static void __exit tegra_rtc_exit(void) -{ - platform_driver_unregister(&tegra_rtc_driver); -} -module_exit(tegra_rtc_exit); +module_platform_driver_probe(tegra_rtc_driver, tegra_rtc_probe); MODULE_AUTHOR("Jon Mayo "); MODULE_DESCRIPTION("driver for Tegra internal RTC");