From patchwork Tue Jun 11 02:37:09 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangfei Gao X-Patchwork-Id: 17774 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f70.google.com (mail-yh0-f70.google.com [209.85.213.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D30082397B for ; Tue, 11 Jun 2013 02:38:31 +0000 (UTC) Received: by mail-yh0-f70.google.com with SMTP id l109sf7807885yhq.1 for ; Mon, 10 Jun 2013 19:38:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere:x-forwarded-to:x-forwarded-for :delivered-to:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=8ljUpzyLIbLO7lJmNSzb5BOK+NpeyWe0a+RduZ/sE64=; b=iLVL1/3pq7GRKYQc/Cpq3jYK5XXdQuIkfz+lQqQ8PCffG3DXD9OrxCcJXLrB2WYPlW 2ttIw4NTc9M+rsjk5DvAa+FWprmJOmAMFVe24UqO/TYpnfzk80ZaX7ne9yjlLp99ZaJ0 lKUDp0h8x8n7GqS6p5TP1Xk5BGFnhNKs8Lxn34SU2xKCdK3fPrK1emioeubrCrKqVga4 lW9vOsAC63PJwZwl4KzH/ASZJcpoHpQK+l1u5iGoSqHj+E/+BJjiju4uowRQkmyKh40Z Ot/tImr/xk9isGl0m++lVp5emLYuZzFcODzcTLSKe3Apv8jezXhTg0lRnkGzsR25w128 810g== X-Received: by 10.224.205.138 with SMTP id fq10mr9901363qab.1.1370918311588; Mon, 10 Jun 2013 19:38:31 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.118.170 with SMTP id kn10ls1570649qeb.91.gmail; Mon, 10 Jun 2013 19:38:31 -0700 (PDT) X-Received: by 10.52.121.99 with SMTP id lj3mr6093616vdb.52.1370918311375; Mon, 10 Jun 2013 19:38:31 -0700 (PDT) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id zt2si6252120vdb.24.2013.06.10.19.38.31 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 10 Jun 2013 19:38:31 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.170; Received: by mail-vc0-f170.google.com with SMTP id hf12so5065575vcb.29 for ; Mon, 10 Jun 2013 19:38:31 -0700 (PDT) X-Received: by 10.220.170.72 with SMTP id c8mr7347153vcz.14.1370918311242; Mon, 10 Jun 2013 19:38:31 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.221.10.206 with SMTP id pb14csp91477vcb; Mon, 10 Jun 2013 19:38:30 -0700 (PDT) X-Received: by 10.68.100.98 with SMTP id ex2mr12762597pbb.19.1370918310344; Mon, 10 Jun 2013 19:38:30 -0700 (PDT) Received: from mail-pd0-f174.google.com (mail-pd0-f174.google.com [209.85.192.174]) by mx.google.com with ESMTPS id ad8si5951720pbd.186.2013.06.10.19.38.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 10 Jun 2013 19:38:30 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.174 is neither permitted nor denied by best guess record for domain of zhangfei.gao@linaro.org) client-ip=209.85.192.174; Received: by mail-pd0-f174.google.com with SMTP id 10so7082152pdc.33 for ; Mon, 10 Jun 2013 19:38:29 -0700 (PDT) X-Received: by 10.66.253.195 with SMTP id ac3mr10903399pad.107.1370918309803; Mon, 10 Jun 2013 19:38:29 -0700 (PDT) Received: from localhost.localdomain ([67.198.145.34]) by mx.google.com with ESMTPSA id dg3sm10461723pbc.24.2013.06.10.19.38.25 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 10 Jun 2013 19:38:29 -0700 (PDT) From: Zhangfei Gao To: Wolfram Sang , Dirk Brandewie , baruch@tkos.co.il Cc: linux-arm-kernel@lists.infradead.org, devicetree-discuss@lists.ozlabs.org, Zhangfei Gao Subject: [PATCH v3 1/2] i2c: designware: use module_platform_driver Date: Tue, 11 Jun 2013 10:37:09 +0800 Message-Id: <1370918230-24793-2-git-send-email-zhangfei.gao@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1370918230-24793-1-git-send-email-zhangfei.gao@linaro.org> References: <1370918230-24793-1-git-send-email-zhangfei.gao@linaro.org> X-Gm-Message-State: ALoCoQn2zaCkD3x7Ki2n47ErgC9KLTWbXrkYwXAqL78zPpfxPLt74CyEe5iB7zMg+YhT8BexezI+ X-Original-Sender: zhangfei.gao@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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");