From patchwork Wed Jan 9 11:15:27 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Porcedda X-Patchwork-Id: 1952061 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 534194020F for ; Wed, 9 Jan 2013 11:18:52 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Tstde-0005HV-Ou; Wed, 09 Jan 2013 11:16:06 +0000 Received: from mail-bk0-f44.google.com ([209.85.214.44]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TstdC-0005AH-Um for linux-arm-kernel@lists.infradead.org; Wed, 09 Jan 2013 11:15:41 +0000 Received: by mail-bk0-f44.google.com with SMTP id w11so834159bku.31 for ; Wed, 09 Jan 2013 03:15:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=c3Bjp8uoyUxvD8lwcpk5MODaKiwvRLxt1zozah54wUA=; b=I2jSArbmRQ60q5L4opS2//CV+gna5hTuUMW3MCEG/g55+39L0DKDDYUxgNtzi7OTP2 XOH0eNdCowMPKPE3GXHBpN0BkeCgYd88BYFRP34mzLfxh7jA4zvfIIGv7x0SocbXiyCY l/z87upkdep5KWXQVxeIqCWTiQHwuVpnUvuaIrmqM49OAU+gpBSVH9+SpmASrTHE5jX7 lRICvakBkaOY0rqVAJ2mIwzvB+jCuH4WNbFonnvXskd1xjO042RqaJIWQE7dn0YpOFUc P74jH9eBBlY6s2joJz3MOj6Uzlv7jVGKOQeZ6ycc/u89rc4gBt1r5z2gN84FrIXGHWOW nVHw== X-Received: by 10.204.149.204 with SMTP id u12mr33053230bkv.108.1357730136749; Wed, 09 Jan 2013 03:15:36 -0800 (PST) Received: from ld2036.tmt.telital.com ([213.205.6.118]) by mx.google.com with ESMTPS id hm8sm48220416bkc.10.2013.01.09.03.15.34 (version=SSLv3 cipher=OTHER); Wed, 09 Jan 2013 03:15:35 -0800 (PST) From: Fabio Porcedda To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-watchdog@vger.kernel.org, linux-usb@vger.kernel.org Subject: [PATCH 2/3] watchdog: convert drivers/watchdog/* to use module_platform_driver_probe Date: Wed, 9 Jan 2013 12:15:27 +0100 Message-Id: <1357730128-23018-3-git-send-email-fabio.porcedda@gmail.com> X-Mailer: git-send-email 1.8.0.3 In-Reply-To: <1357730128-23018-1-git-send-email-fabio.porcedda@gmail.com> References: <1357730128-23018-1-git-send-email-fabio.porcedda@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130109_061539_228469_E5E5CDEC X-CRM114-Status: GOOD ( 11.03 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.214.44 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (fabio.porcedda[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 2.5 SUSPICIOUS_RECIPS Similar addresses in recipient list -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Wim Van Sebroeck , Linus Walleij X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This makes the code a bit smaller by getting rid of some boilerplate code. Signed-off-by: Fabio Porcedda Cc: linux-watchdog@vger.kernel.org Cc: Wim Van Sebroeck Cc: Linus Walleij --- drivers/watchdog/at32ap700x_wdt.c | 12 +----------- drivers/watchdog/at91sam9_wdt.c | 13 +------------ drivers/watchdog/coh901327_wdt.c | 12 +----------- drivers/watchdog/imx2_wdt.c | 12 +----------- drivers/watchdog/txx9wdt.c | 13 +------------ 5 files changed, 5 insertions(+), 57 deletions(-) diff --git a/drivers/watchdog/at32ap700x_wdt.c b/drivers/watchdog/at32ap700x_wdt.c index 2896430..7a715e3 100644 --- a/drivers/watchdog/at32ap700x_wdt.c +++ b/drivers/watchdog/at32ap700x_wdt.c @@ -436,17 +436,7 @@ static struct platform_driver at32_wdt_driver = { .shutdown = at32_wdt_shutdown, }; -static int __init at32_wdt_init(void) -{ - return platform_driver_probe(&at32_wdt_driver, at32_wdt_probe); -} -module_init(at32_wdt_init); - -static void __exit at32_wdt_exit(void) -{ - platform_driver_unregister(&at32_wdt_driver); -} -module_exit(at32_wdt_exit); +module_platform_driver_probe(at32_wdt_driver, at32_wdt_probe); MODULE_AUTHOR("Hans-Christian Egtvedt "); MODULE_DESCRIPTION("Watchdog driver for Atmel AT32AP700X"); diff --git a/drivers/watchdog/at91sam9_wdt.c b/drivers/watchdog/at91sam9_wdt.c index d864dc4..60bc700 100644 --- a/drivers/watchdog/at91sam9_wdt.c +++ b/drivers/watchdog/at91sam9_wdt.c @@ -331,18 +331,7 @@ static struct platform_driver at91wdt_driver = { }, }; -static int __init at91sam_wdt_init(void) -{ - return platform_driver_probe(&at91wdt_driver, at91wdt_probe); -} - -static void __exit at91sam_wdt_exit(void) -{ - platform_driver_unregister(&at91wdt_driver); -} - -module_init(at91sam_wdt_init); -module_exit(at91sam_wdt_exit); +module_platform_driver_probe(at91wdt_driver, at91wdt_probe); MODULE_AUTHOR("Renaud CERRATO "); MODULE_DESCRIPTION("Watchdog driver for Atmel AT91SAM9x processors"); diff --git a/drivers/watchdog/coh901327_wdt.c b/drivers/watchdog/coh901327_wdt.c index cb5da5c..b9b8a8b 100644 --- a/drivers/watchdog/coh901327_wdt.c +++ b/drivers/watchdog/coh901327_wdt.c @@ -451,17 +451,7 @@ static struct platform_driver coh901327_driver = { .resume = coh901327_resume, }; -static int __init coh901327_init(void) -{ - return platform_driver_probe(&coh901327_driver, coh901327_probe); -} -module_init(coh901327_init); - -static void __exit coh901327_exit(void) -{ - platform_driver_unregister(&coh901327_driver); -} -module_exit(coh901327_exit); +module_platform_driver_probe(coh901327_driver, coh901327_probe); MODULE_AUTHOR("Linus Walleij "); MODULE_DESCRIPTION("COH 901 327 Watchdog"); diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c index 9a45d029..bc17dec 100644 --- a/drivers/watchdog/imx2_wdt.c +++ b/drivers/watchdog/imx2_wdt.c @@ -342,17 +342,7 @@ static struct platform_driver imx2_wdt_driver = { }, }; -static int __init imx2_wdt_init(void) -{ - return platform_driver_probe(&imx2_wdt_driver, imx2_wdt_probe); -} -module_init(imx2_wdt_init); - -static void __exit imx2_wdt_exit(void) -{ - platform_driver_unregister(&imx2_wdt_driver); -} -module_exit(imx2_wdt_exit); +module_platform_driver_probe(imx2_wdt_driver, imx2_wdt_probe); MODULE_AUTHOR("Wolfram Sang"); MODULE_DESCRIPTION("Watchdog driver for IMX2 and later"); diff --git a/drivers/watchdog/txx9wdt.c b/drivers/watchdog/txx9wdt.c index 98e1637..b04c92b 100644 --- a/drivers/watchdog/txx9wdt.c +++ b/drivers/watchdog/txx9wdt.c @@ -172,18 +172,7 @@ static struct platform_driver txx9wdt_driver = { }, }; -static int __init watchdog_init(void) -{ - return platform_driver_probe(&txx9wdt_driver, txx9wdt_probe); -} - -static void __exit watchdog_exit(void) -{ - platform_driver_unregister(&txx9wdt_driver); -} - -module_init(watchdog_init); -module_exit(watchdog_exit); +module_platform_driver_probe(txx9wdt_driver, txx9wdt_probe); MODULE_DESCRIPTION("TXx9 Watchdog Driver"); MODULE_LICENSE("GPL");