Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp523590imm; Sat, 7 Jul 2018 02:31:44 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfUpR/opEUWLhY56UDf67jNjwNlvHkFkBEo6aQ9PdGRYozUx6k4iT7ihwKSNzgvZN6IBn3w X-Received: by 2002:a62:c918:: with SMTP id k24-v6mr13736120pfg.160.1530955904359; Sat, 07 Jul 2018 02:31:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530955904; cv=none; d=google.com; s=arc-20160816; b=swaIpvcuRv7GGfjKbnlOLGqeN7DcmseHxCS4yifHbeuURFlW7ScAJO+jppCLoA11A7 oYvrWA+n+Mnj0IHI5aMVMm+RCPr+VWksePnn48ZyRj6rLoqVayBQQCzXl7Ycu/wTm1LE jNJQp9CqSAqYgPUM6jMXOWJMVHInrVEjFYizuU5tcjAsEo7h1KpR73TRPnI342+aSXqg btY0kbKHKt16ieVMDFaQKZZPz4MFuFNvWij+TpHg9PM5lTRGNZBnPa+mxAzoTVYWjYD5 LVH9b4Cwnp6Mp+855xxjjd9JpQsWN65Ggx4mY78RLCEAHZf727bCdT5hMfWPAnrTsSz3 LsrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=pWNnNsDMXZl2Vgb1FZWYzyXhxrLTGY+X2cvJP+itqDM=; b=hIW253u3HDKQmz6Q2che4yAT0o+JyOGljz3CmgPmJdWPI3ywJ1DcS+2mZLKb4UpIEJ Pxv3/dAR79dh4pn4DopvPg7NyBMtB3UdvkDCmIlr46BGJB3SgyTrf0GMrA7mz/07tA1k TVCFsyv8abF38hg/QVtA42CWbGUkBddlQmt0DpaUhRmW6cvKAD8f1tz+gTV/sWsZiRRp nXD1VuU8aT/slBHLDuJib/rTqBtxahT84vYxN0cj48zzfoqFrh9Kyl/KjRj1+GRWubp0 ikpZ97PylgSm7VaYdQQynVy9B6TpDaDuxu1W4EW+F2vrj9LHJWU0Dyzgafe+ujNfNZwX +TqA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c1-v6si3555796pll.259.2018.07.07.02.31.19; Sat, 07 Jul 2018 02:31:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753714AbeGGJaT (ORCPT + 99 others); Sat, 7 Jul 2018 05:30:19 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:43995 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1752080AbeGGJaP (ORCPT ); Sat, 7 Jul 2018 05:30:15 -0400 X-UUID: 74a8f46f90b741efbea7f79eceae935c-20180707 Received: from mtkcas09.mediatek.inc [(172.21.101.178)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1213024681; Sat, 07 Jul 2018 17:30:06 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs03n2.mediatek.inc (172.21.101.182) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Sat, 7 Jul 2018 17:30:04 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Sat, 7 Jul 2018 17:30:04 +0800 From: Jun Gao To: Wolfram Sang CC: , , , , , , Jun Gao Subject: [PATCH v2 1/3] i2c: mediatek: Register i2c adapter driver earlier Date: Sat, 7 Jul 2018 17:29:53 +0800 Message-ID: <1530955795-17714-2-git-send-email-jun.gao@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1530955795-17714-1-git-send-email-jun.gao@mediatek.com> References: <1530955795-17714-1-git-send-email-jun.gao@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jun Gao As i2c adapter, i2c slave devices will depend on it. In order not to block the initializations of i2c slave devices, register i2c adapter driver at appropriate time. Signed-off-by: Jun Gao --- drivers/i2c/busses/i2c-mt65xx.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-mt65xx.c b/drivers/i2c/busses/i2c-mt65xx.c index 1e57f58..806e8b90 100644 --- a/drivers/i2c/busses/i2c-mt65xx.c +++ b/drivers/i2c/busses/i2c-mt65xx.c @@ -888,7 +888,17 @@ static int mtk_i2c_resume(struct device *dev) }, }; -module_platform_driver(mtk_i2c_driver); +static int __init mtk_i2c_adap_init(void) +{ + return platform_driver_register(&mtk_i2c_driver); +} +subsys_initcall(mtk_i2c_adap_init); + +static void __exit mtk_i2c_adap_exit(void) +{ + platform_driver_unregister(&mtk_i2c_driver); +} +module_exit(mtk_i2c_adap_exit); MODULE_LICENSE("GPL v2"); MODULE_DESCRIPTION("MediaTek I2C Bus Driver"); -- 1.8.1.1