From patchwork Wed Sep 5 10:01:32 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 11191 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 0B09123EFF for ; Wed, 5 Sep 2012 10:04:21 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id EF724A188A7 for ; Wed, 5 Sep 2012 10:03:27 +0000 (UTC) Received: by ieak11 with SMTP id k11so673554iea.11 for ; Wed, 05 Sep 2012 03:04:20 -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:mime-version:content-type :content-transfer-encoding:x-gm-message-state; bh=tR1VJF2wKD5+1uHlPQlzsp7kcS5dU57I6UfX6BvOiMI=; b=KjIvOQ3ewN9kajQtYXHmHmM7RFeOOekXP4NYAI0xCUfp3k4izg3d67iRbL64errl5c opF1345Du7eQQrcr/CgGPI54G/NvFzZ9itrsKANB8r79prltuGzfa+C0525DHlpcBDR4 K7PPhaK/itF4DTrNEdgUDZrV0EGxXzxf/5Xe4971qknFXXGZhlHl4Nj7eInGZrqNInTF FEaxjDbLE1P3qTYzsRe1HVmYIuNNRpANAvpyTT2UxmB6kr8BLOdc9lSO3SV6/s52U8RN 42XnhjJ1fToFv4eqcF3b0GlpHwodSZ/4sBRn8cnySuRcXRDvRHHwkJ33Hxao6V5nD2hA pe8Q== Received: by 10.50.237.41 with SMTP id uz9mr17040651igc.43.1346839460122; Wed, 05 Sep 2012 03:04:20 -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.50.184.232 with SMTP id ex8csp243848igc; Wed, 5 Sep 2012 03:04:19 -0700 (PDT) Received: by 10.68.200.227 with SMTP id jv3mr52963584pbc.162.1346839459474; Wed, 05 Sep 2012 03:04:19 -0700 (PDT) Received: from mail-pz0-f50.google.com (mail-pz0-f50.google.com [209.85.210.50]) by mx.google.com with ESMTPS id pb4si1824986pbc.270.2012.09.05.03.04.19 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 05 Sep 2012 03:04:19 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.210.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.210.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.210.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 dade7 with SMTP id e7so289387dad.37 for ; Wed, 05 Sep 2012 03:04:19 -0700 (PDT) Received: by 10.68.125.133 with SMTP id mq5mr53978826pbb.42.1346839459026; Wed, 05 Sep 2012 03:04:19 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id mr2sm1111460pbb.16.2012.09.05.03.04.15 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 05 Sep 2012 03:04:18 -0700 (PDT) From: Sachin Kamat To: linux-mtd@lists.infradead.org Cc: artem.bityutskiy@linux.intel.com, dwmw2@infradead.org, dedekind1@gmail.com, sachin.kamat@linaro.org, patches@linaro.org Subject: =?UTF-8?q?=5BPATCH=5D=20mtd=3A=20nand/gpio=3A=20Use=20module=5Fplatform=5Fdriver=20macro?= Date: Wed, 5 Sep 2012 15:31:32 +0530 Message-Id: <1346839292-31001-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQlec+HekTzF+r0T+mq1g8IRwB8zrBqHkTX+Asia0t09VtLmUEn0AzAAnCTJNKDNx2YY/0Lo module_platform_driver simplifies the code by eliminating module_init and module_exit calls. Signed-off-by: Sachin Kamat --- drivers/mtd/nand/gpio.c | 15 +-------------- 1 files changed, 1 insertions(+), 14 deletions(-) diff --git a/drivers/mtd/nand/gpio.c b/drivers/mtd/nand/gpio.c index ce6a284..bc73bc5 100644 --- a/drivers/mtd/nand/gpio.c +++ b/drivers/mtd/nand/gpio.c @@ -417,20 +417,7 @@ static struct platform_driver gpio_nand_driver = { }, }; -static int __init gpio_nand_init(void) -{ - printk(KERN_INFO "GPIO NAND driver, © 2004 Simtec Electronics\n"); - - return platform_driver_register(&gpio_nand_driver); -} - -static void __exit gpio_nand_exit(void) -{ - platform_driver_unregister(&gpio_nand_driver); -} - -module_init(gpio_nand_init); -module_exit(gpio_nand_exit); +module_platform_driver(gpio_nand_driver); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Ben Dooks ");