From patchwork Thu May 30 02:22:16 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Libo Chen X-Patchwork-Id: 247441 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:770:15f::2]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 36E382C0087 for ; Thu, 30 May 2013 12:25:11 +1000 (EST) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UhsXe-00083d-LA; Thu, 30 May 2013 02:24:39 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UhsXc-0004ct-LS; Thu, 30 May 2013 02:24:36 +0000 Received: from szxga01-in.huawei.com ([119.145.14.64]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UhsXY-0004c5-O9 for linux-mtd@lists.infradead.org; Thu, 30 May 2013 02:24:34 +0000 Received: from 172.24.2.119 (EHLO szxeml205-edg.china.huawei.com) ([172.24.2.119]) by szxrg01-dlp.huawei.com (MOS 4.3.4-GA FastPath queued) with ESMTP id BCX60709; Thu, 30 May 2013 10:22:40 +0800 (CST) Received: from SZXEML416-HUB.china.huawei.com (10.82.67.155) by szxeml205-edg.china.huawei.com (172.24.2.58) with Microsoft SMTP Server (TLS) id 14.1.323.7; Thu, 30 May 2013 10:22:32 +0800 Received: from [127.0.0.1] (10.135.72.158) by szxeml416-hub.china.huawei.com (10.82.67.155) with Microsoft SMTP Server id 14.1.323.7; Thu, 30 May 2013 10:22:18 +0800 Message-ID: <51A6B7D8.8090600@huawei.com> Date: Thu, 30 May 2013 10:22:16 +0800 From: Libo Chen User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 MIME-Version: 1.0 To: , Andy Shevchenko Subject: [PATCH RESEND 2/2] mtd: bcm47: convert to module_platform_driver instead of init/exit X-Originating-IP: [10.135.72.158] X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130529_222433_053597_C9DAA254 X-CRM114-Status: UNSURE ( 8.21 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -3.0 (---) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-3.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -1.1 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Li Zefan , artem.bityutskiy@linux.intel.com, =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= , LKML , Bill Pemberton , linux-mtd@lists.infradead.org, hauke@hauke-m.de X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org convert to module_platform_driver instead of init/exit Suggested-by: Andy Shevchenko Signed-off-by: Libo chen --- drivers/mtd/devices/bcm47xxsflash.c | 20 +------------------- 1 files changed, 1 insertions(+), 19 deletions(-) diff --git a/drivers/mtd/devices/bcm47xxsflash.c b/drivers/mtd/devices/bcm47xxsflash.c index 2630d5c..54230cd 100644 --- a/drivers/mtd/devices/bcm47xxsflash.c +++ b/drivers/mtd/devices/bcm47xxsflash.c @@ -108,22 +108,4 @@ static struct platform_driver bcma_sflash_driver = { * Init **************************************************/ -static int __init bcm47xxsflash_init(void) -{ - int err; - - err = platform_driver_register(&bcma_sflash_driver); - if (err) - pr_err("Failed to register BCMA serial flash driver: %d\n", - err); - - return err; -} - -static void __exit bcm47xxsflash_exit(void) -{ - platform_driver_unregister(&bcma_sflash_driver); -} - -module_init(bcm47xxsflash_init); -module_exit(bcm47xxsflash_exit); +module_platform_driver(bcma_sflash_driver);