From patchwork Thu Jul 12 11:47:40 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 9954 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 96F8F24027 for ; Thu, 12 Jul 2012 11:48:06 +0000 (UTC) Received: from mail-gh0-f180.google.com (mail-gh0-f180.google.com [209.85.160.180]) by fiordland.canonical.com (Postfix) with ESMTP id 5FCDDA186B9 for ; Thu, 12 Jul 2012 11:48:06 +0000 (UTC) Received: by ghbz12 with SMTP id z12so2465356ghb.11 for ; Thu, 12 Jul 2012 04:48:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:x-gm-message-state; bh=uRO7UT5TS1kZLX+stzCWG5VII+ICl5zOeo1KmnR49qk=; b=ogjU67uCSyhD+gz8oBbx3W5oH+wMrhVwsTS9a4Jk/aK6rvCZmj8h0uIFvnGQO8dddY B/kUTe/yteRRIlH1iGBoz8V7fBxALdGbNL5ICLuooA+uVsKQ1Gy1Mob8JSI+Vk6J6htV i2Uk8/M/YP6VuYcgmmrhfhwqSNwyJPOSf5lK0NWYNUSuyHvXgVHCZn/w1oZryMDN6CB5 fxgU7AkZWJdtJZVOFhn+L8K0PkSLuTo3M2PTaaunKSqo0uBiMkk/+AP4Eiz+8uHdA3G3 84zuvs0B8uMuuGeH6cMSeN22frOGOMbPtDb9grs/KTcCW+iD4LUhCUqJqXMHNm8xmrCP xa+Q== Received: by 10.50.87.227 with SMTP id bb3mr16864762igb.57.1342093684842; Thu, 12 Jul 2012 04:48:04 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.241.2 with SMTP id lc2csp1996ibb; Thu, 12 Jul 2012 04:48:04 -0700 (PDT) Received: by 10.236.161.39 with SMTP id v27mr10319632yhk.126.1342093683925; Thu, 12 Jul 2012 04:48:03 -0700 (PDT) Received: from mail-yw0-f50.google.com (mail-yw0-f50.google.com [209.85.213.50]) by mx.google.com with ESMTPS id u4si3949428yhm.56.2012.07.12.04.48.03 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 12 Jul 2012 04:48:03 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.213.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.213.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.213.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by yhjj63 with SMTP id j63so2420473yhj.37 for ; Thu, 12 Jul 2012 04:48:03 -0700 (PDT) Received: by 10.66.77.7 with SMTP id o7mr59642362paw.37.1342093682976; Thu, 12 Jul 2012 04:48:02 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id he9sm3725552pbc.68.2012.07.12.04.47.59 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 12 Jul 2012 04:48:02 -0700 (PDT) From: Sachin Kamat To: linux-watchdog@vger.kernel.org Cc: wim@iguana.be, ben-linux@fluff.org, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH] watchdog: s3c2410_wdt: Use module_platform_driver() Date: Thu, 12 Jul 2012 17:17:40 +0530 Message-Id: <1342093660-19735-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 X-Gm-Message-State: ALoCoQm1kBZPO7IRZ3SdgSTHhDL70B+WLad1X6obe6orOMOO6//1CTjKFPidh9LSA1PRwvmaQC9Y module_platform_driver() replaces module_init() and module_exit() and makes the code simpler. Signed-off-by: Sachin Kamat --- drivers/watchdog/s3c2410_wdt.c | 16 +--------------- 1 files changed, 1 insertions(+), 15 deletions(-) diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c index 200ece5..9245b4d 100644 --- a/drivers/watchdog/s3c2410_wdt.c +++ b/drivers/watchdog/s3c2410_wdt.c @@ -519,21 +519,7 @@ static struct platform_driver s3c2410wdt_driver = { }, }; - -static int __init watchdog_init(void) -{ - pr_info("S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics\n"); - - return platform_driver_register(&s3c2410wdt_driver); -} - -static void __exit watchdog_exit(void) -{ - platform_driver_unregister(&s3c2410wdt_driver); -} - -module_init(watchdog_init); -module_exit(watchdog_exit); +module_platform_driver(s3c2410wdt_driver); MODULE_AUTHOR("Ben Dooks , " "Dimitry Andric ");