From patchwork Wed Jun 19 19:54:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Shiyan X-Patchwork-Id: 2751851 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 878EE9F96B for ; Wed, 19 Jun 2013 19:57:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BBEAD2025C for ; Wed, 19 Jun 2013 19:57:10 +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 B2BDD2023E for ; Wed, 19 Jun 2013 19:57:09 +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 1UpOU5-0006NM-Px; Wed, 19 Jun 2013 19:56:03 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UpOTt-0004Bg-Tg; Wed, 19 Jun 2013 19:55:50 +0000 Received: from smtp11.mail.ru ([94.100.176.85]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UpOTW-00047Z-44 for linux-arm-kernel@lists.infradead.org; Wed, 19 Jun 2013 19:55:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.ru; s=mail2; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=OIEpYrdMZxlfVFpOQRKyP/udpN7ZmWHM3eqE+Ur2Ftw=; b=PFJzPy5C1BioOEUd19S3/WXg3ZAFAU+fxt2XHF7R98mO8mnZqBhyyRNPJ/eQUiyCh9aqSTEYfzi9LcYAuofOFLAHgw2AbWfDWjnuZC555ZZeCm2sMBPr0go5eBYnQDaX1uUDNqeaZZsBKAZ1r+Mkqe9jx550pxc3G5D7Tt25MqQ=; Received: from [188.134.40.128] (port=25762 helo=shc.zet) by smtp11.mail.ru with esmtpa (envelope-from ) id 1UpOT3-0005WI-EK; Wed, 19 Jun 2013 23:54:57 +0400 From: Alexander Shiyan To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 3/7] drivers: bus: imx-weim: use module_platform_driver_probe() Date: Wed, 19 Jun 2013 23:54:34 +0400 Message-Id: <1371671678-6345-3-git-send-email-shc_work@mail.ru> X-Mailer: git-send-email 1.8.1.5 In-Reply-To: <1371671678-6345-1-git-send-email-shc_work@mail.ru> References: <1371671678-6345-1-git-send-email-shc_work@mail.ru> X-Mras: Ok X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130619_155526_805809_2D11BCE7 X-CRM114-Status: GOOD ( 11.23 ) X-Spam-Score: -2.0 (--) Cc: Russell King , Alexander Shiyan , Arnd Bergmann , Sascha Hauer , Huang Shijie , Olof Johansson , Shawn Guo 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,DKIM_SIGNED, FREEMAIL_FROM,RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID, 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 Driver should be called only once at startup, so code converted to using module_platform_driver_probe(). Signed-off-by: Alexander Shiyan --- drivers/bus/imx-weim.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/bus/imx-weim.c b/drivers/bus/imx-weim.c index 0f4b081..f872924 100644 --- a/drivers/bus/imx-weim.c +++ b/drivers/bus/imx-weim.c @@ -22,7 +22,7 @@ MODULE_DEVICE_TABLE(of, weim_id_table); #define CS_REG_RANGE 0x18 /* Parse and set the timing for this device. */ -static int weim_timing_setup(struct device_node *np, void __iomem *base) +static int __init weim_timing_setup(struct device_node *np, void __iomem *base) { u32 value[CS_TIMING_LEN]; u32 cs_idx; @@ -49,7 +49,8 @@ static int weim_timing_setup(struct device_node *np, void __iomem *base) return 0; } -static int weim_parse_dt(struct platform_device *pdev, void __iomem *base) +static int __init weim_parse_dt(struct platform_device *pdev, + void __iomem *base) { struct device_node *child; int ret; @@ -73,7 +74,7 @@ static int weim_parse_dt(struct platform_device *pdev, void __iomem *base) return ret; } -static int weim_probe(struct platform_device *pdev) +static int __init weim_probe(struct platform_device *pdev) { struct resource *res; struct clk *clk; @@ -110,10 +111,9 @@ static struct platform_driver weim_driver = { .name = "imx-weim", .of_match_table = weim_id_table, }, - .probe = weim_probe, }; +module_platform_driver_probe(weim_driver, weim_probe); -module_platform_driver(weim_driver); MODULE_AUTHOR("Freescale Semiconductor Inc."); MODULE_DESCRIPTION("i.MX EIM Controller Driver"); MODULE_LICENSE("GPL");