From patchwork Tue Aug 20 08:32:28 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangfei Gao X-Patchwork-Id: 19348 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vb0-f69.google.com (mail-vb0-f69.google.com [209.85.212.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 560572468F for ; Tue, 20 Aug 2013 08:32:47 +0000 (UTC) Received: by mail-vb0-f69.google.com with SMTP id e13sf126700vbg.0 for ; Tue, 20 Aug 2013 01:32:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=ZSzzmJQ1CuIEINqMP1lHL/l0m4vhOSUc6gSA44dEgNU=; b=EUxh8KVtZr7Xic6r0hPS1M9kuaf+ClAbz2dob7Ln5GTjun3+WokWa8nHHsenWFQiMC f4o6G+egMCVTvsJr7pI72peZIc/9v4EAr7XV90phg6P/6NT3JIlcM0gPkvNKCXp571eH nuBKp/ZOVN6f1FHjc5Lp4UBnc4bF9keMavvet/FBfgvJ7DUg0VZ76NRe7yu4JZhkV7C6 TZbpdHg9kVLBbJr0mrgOx3GAnTPgjlow+5R7DybhlWE4/L24ePS+Id87V9q4d2FT2P3j xCU+LlYI+fN+7/9ZtpVrbXyvD1RL8XYC9xMq0lkeFOgz8xYP+w33YfYhMQTHoBgnCzne zSSw== X-Received: by 10.236.70.5 with SMTP id o5mr209999yhd.12.1376987567138; Tue, 20 Aug 2013 01:32:47 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.49.42 with SMTP id r10ls153817qen.86.gmail; Tue, 20 Aug 2013 01:32:47 -0700 (PDT) X-Received: by 10.58.97.138 with SMTP id ea10mr136353veb.38.1376987567024; Tue, 20 Aug 2013 01:32:47 -0700 (PDT) Received: from mail-vb0-f47.google.com (mail-vb0-f47.google.com [209.85.212.47]) by mx.google.com with ESMTPS id rp4si89349vcb.111.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 20 Aug 2013 01:32:46 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.47 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.47; Received: by mail-vb0-f47.google.com with SMTP id h10so70066vbh.34 for ; Tue, 20 Aug 2013 01:32:46 -0700 (PDT) X-Gm-Message-State: ALoCoQnvNq/OUkxeXtQtl+8fPWBVUp+r65MDLYAiWX7cZwG3y7wZ8aIFxuaQr3OxD4ULvVpqBBsu X-Received: by 10.221.40.10 with SMTP id to10mr149764vcb.22.1376987566905; Tue, 20 Aug 2013 01:32:46 -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.220.174.196 with SMTP id u4csp143498vcz; Tue, 20 Aug 2013 01:32:46 -0700 (PDT) X-Received: by 10.66.196.168 with SMTP id in8mr2339723pac.18.1376987565373; Tue, 20 Aug 2013 01:32:45 -0700 (PDT) Received: from mail-pb0-f51.google.com (mail-pb0-f51.google.com [209.85.160.51]) by mx.google.com with ESMTPS id yl7si1735381pab.174.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 20 Aug 2013 01:32:44 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.51 is neither permitted nor denied by best guess record for domain of zhangfei.gao@linaro.org) client-ip=209.85.160.51; Received: by mail-pb0-f51.google.com with SMTP id jt11so125853pbb.38 for ; Tue, 20 Aug 2013 01:32:44 -0700 (PDT) X-Received: by 10.68.238.104 with SMTP id vj8mr406051pbc.149.1376987564434; Tue, 20 Aug 2013 01:32:44 -0700 (PDT) Received: from localhost.localdomain ([114.97.107.100]) by mx.google.com with ESMTPSA id jf4sm723707pbb.19.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 20 Aug 2013 01:32:43 -0700 (PDT) From: Zhangfei Gao To: Wolfram Sang , Baruch Siach Cc: linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org, Zhangfei Gao Subject: [PATCH RESEND] i2c: designware: use module_platform_driver Date: Tue, 20 Aug 2013 16:32:28 +0800 Message-Id: <1376987548-12366-1-git-send-email-zhangfei.gao@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: zhangfei.gao@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.47 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 Acked-by: 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 4c5fada..36ceebc 100644 --- a/drivers/i2c/busses/i2c-designware-platdrv.c +++ b/drivers/i2c/busses/i2c-designware-platdrv.c @@ -236,6 +236,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", @@ -245,18 +246,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");