From patchwork Tue Jun 18 15:20:30 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 2742971 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8264B9F39E for ; Tue, 18 Jun 2013 15:26:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D46D1204AC for ; Tue, 18 Jun 2013 15:26:07 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2375920471 for ; Tue, 18 Jun 2013 15:26:06 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UoxkV-0003Na-2F; Tue, 18 Jun 2013 15:23:14 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Uoxjt-0003In-8W; Tue, 18 Jun 2013 15:22:33 +0000 Received: from mail-pb0-x229.google.com ([2607:f8b0:400e:c01::229]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UoxjE-0003Bo-MQ for linux-arm-kernel@lists.infradead.org; Tue, 18 Jun 2013 15:21:54 +0000 Received: by mail-pb0-f41.google.com with SMTP id rp16so4047440pbb.28 for ; Tue, 18 Jun 2013 08:21:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :in-reply-to:references:x-gm-message-state; bh=mmTp0Ro0yAmugx1k0W8IgO83dIcG5O0reFhm0GPfBfQ=; b=nWRs6MsdZElOdd71GUf2/600r+heLtS2jigDBale6B872fGkDRZgkupBE+jm/CU0Ti IYsL1n3qKLKES9Si2N44FN3TFNuFsaId2A+nqqM8bMKe2AqWiTWDIoqjOUJg7EQXUamq zC4svkxBgBOrHW1veHtKlUUManKxCgcwkh0DJy++uibxirAKpYtqBYvyIn4jqHhy+edO /9MP4pXTjn9t6+PrJCXnGJYrzXPeLHTZJUE++Yx4itIwWhu7ReTuVP1KGrJq/EV9HfTy oxZ6cqPW568Ag/YELS/HCItCYxedd3xte34u644sX68Mln5scF2LuWh90Kxv3qFpZ2ML vL4w== X-Received: by 10.68.166.229 with SMTP id zj5mr17939052pbb.167.1371568892865; Tue, 18 Jun 2013 08:21:32 -0700 (PDT) Received: from localhost ([122.167.240.191]) by mx.google.com with ESMTPSA id at1sm18722865pbc.10.2013.06.18.08.21.29 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 18 Jun 2013 08:21:32 -0700 (PDT) From: Viresh Kumar To: wim@iguana.be Subject: [PATCH V3 06/14] watchdog/mpcore_wdt: convert to use module_platform_driver() Date: Tue, 18 Jun 2013 20:50:30 +0530 Message-Id: X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e In-Reply-To: References: In-Reply-To: References: X-Gm-Message-State: ALoCoQnqaMeX0/yGA7O5UTRpa9x30MoUOSaUOTsNCOxwVhT0i4DrF7Fj8s4d9Sp9UPToDJbrjQu8 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130618_112152_866841_57B0399C X-CRM114-Status: GOOD ( 11.80 ) X-Spam-Score: -1.9 (-) Cc: marc.zyngier@arm.com, Viresh Kumar , linux-watchdog@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch converts the mpcore_wdt driver to use the module_platform_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Viresh Kumar --- drivers/watchdog/mpcore_wdt.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/watchdog/mpcore_wdt.c b/drivers/watchdog/mpcore_wdt.c index b699df4..5955757 100644 --- a/drivers/watchdog/mpcore_wdt.c +++ b/drivers/watchdog/mpcore_wdt.c @@ -294,18 +294,7 @@ static struct platform_driver mpcore_wdt_driver = { }, }; -static int __init mpcore_wdt_init(void) -{ - return platform_driver_register(&mpcore_wdt_driver); -} - -static void __exit mpcore_wdt_exit(void) -{ - platform_driver_unregister(&mpcore_wdt_driver); -} - -module_init(mpcore_wdt_init); -module_exit(mpcore_wdt_exit); +module_platform_driver(mpcore_wdt_driver); MODULE_AUTHOR("ARM Limited"); MODULE_DESCRIPTION("MPcore Watchdog Device Driver");