From patchwork Mon Jun 10 05:02:54 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangfei Gao X-Patchwork-Id: 2695731 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork2.kernel.org (Postfix) with ESMTP id 60FE4DF264 for ; Mon, 10 Jun 2013 05:03:57 +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 1UluGg-0000g5-8V; Mon, 10 Jun 2013 05:03:46 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UluGb-0000po-Em; Mon, 10 Jun 2013 05:03:41 +0000 Received: from mail-pb0-x235.google.com ([2607:f8b0:400e:c01::235]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UluGU-0000oq-Oi for linux-arm-kernel@lists.infradead.org; Mon, 10 Jun 2013 05:03:35 +0000 Received: by mail-pb0-f53.google.com with SMTP id xb12so6730735pbc.26 for ; Sun, 09 Jun 2013 22:03:13 -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 :x-gm-message-state; bh=8ljUpzyLIbLO7lJmNSzb5BOK+NpeyWe0a+RduZ/sE64=; b=m+Vidb3xlH08W+TmJv0Cy/9T5XuAiGtXEBhcPn1MeKv6ufLvBX+/tWOZEWgYiNfOm8 WpxLqsE4bqRKa5t0w8UvK6P99pNfkub8kXKayMGdD3vejd8XJj93TT+T/4qTY65D5TT8 PCS4ikup+5yQhspVYTpd3JHTRhy4J0TYKFGXLabClJWcvOpZCmy0Od+GWXKczRBUqnjV RLc3B4d6AlJ3z3/Y+TQmBW+g0WlRygoW5XSbc2UHc4PbAY9Dd6EP3dzoC7LQMcoQ/PYX CqVqIZYkI62Tl/1PnjJUgrsUA/vIqhEWnEhdHFZTpAguBROqFYdXfEV8OX9gCTZvuu/+ qfBA== X-Received: by 10.68.0.66 with SMTP id 2mr8531655pbc.15.1370840593161; Sun, 09 Jun 2013 22:03:13 -0700 (PDT) Received: from localhost.localdomain ([124.73.11.242]) by mx.google.com with ESMTPSA id eq4sm13955065pad.16.2013.06.09.22.03.08 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 09 Jun 2013 22:03:12 -0700 (PDT) From: Zhangfei Gao To: Wolfram Sang , Dirk Brandewie , baruch@tkos.co.il Subject: [PATCH v2 1/2] i2c: designware: use module_platform_driver Date: Mon, 10 Jun 2013 13:02:54 +0800 Message-Id: <1370840576-15651-2-git-send-email-zhangfei.gao@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1370840576-15651-1-git-send-email-zhangfei.gao@linaro.org> References: <1370840576-15651-1-git-send-email-zhangfei.gao@linaro.org> X-Gm-Message-State: ALoCoQlz8Td3LsRLOjpfWkT1lwC6fXEls3LY/nxfE3nOkz4jsVD6wphoIip1DSsxrthpyOdAOuET X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130610_010334_948364_D48E99C6 X-CRM114-Status: GOOD ( 11.92 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Zhangfei Gao , devicetree-discuss@lists.ozlabs.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 Instead of use platform_driver_probe, use module_platform_driver To support deferred probing Also subsys_initcall may too early to auto set pinctl Signed-off-by: Zhangfei Gao CC: Baruch Siach --- drivers/i2c/busses/i2c-designware-platdrv.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c index 35b70a1..41659c0 100644 --- a/drivers/i2c/busses/i2c-designware-platdrv.c +++ b/drivers/i2c/busses/i2c-designware-platdrv.c @@ -231,6 +231,7 @@ static SIMPLE_DEV_PM_OPS(dw_i2c_dev_pm_ops, dw_i2c_suspend, dw_i2c_resume); MODULE_ALIAS("platform:i2c_designware"); static struct platform_driver dw_i2c_driver = { + .probe = dw_i2c_probe, .remove = dw_i2c_remove, .driver = { .name = "i2c_designware", @@ -240,18 +241,7 @@ static struct platform_driver dw_i2c_driver = { .pm = &dw_i2c_dev_pm_ops, }, }; - -static int __init dw_i2c_init_driver(void) -{ - return platform_driver_probe(&dw_i2c_driver, dw_i2c_probe); -} -subsys_initcall(dw_i2c_init_driver); - -static void __exit dw_i2c_exit_driver(void) -{ - platform_driver_unregister(&dw_i2c_driver); -} -module_exit(dw_i2c_exit_driver); +module_platform_driver(dw_i2c_driver); MODULE_AUTHOR("Baruch Siach "); MODULE_DESCRIPTION("Synopsys DesignWare I2C bus adapter");