Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp947159imm; Thu, 6 Sep 2018 12:42:09 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdb0KJfqYi3e619n/2ANTLgJL0GypHOQFAKpgTSEP3tph8tPhhx4tBbjiSlwbX0MYgS7D/BI X-Received: by 2002:a63:67c3:: with SMTP id b186-v6mr4407914pgc.5.1536262928943; Thu, 06 Sep 2018 12:42:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536262928; cv=none; d=google.com; s=arc-20160816; b=qqNFi5zb+j1syM39V+0lNJR2itJrsKanxnuecFTobdIgIKwWyy/Sgex7v1qKSgwVjc CyjksJ8Y9gF3DBA9A79bI/4scC3mVl8cudeqOthtxU2YvAQ6Z7Oeogd1y7L92TkJ6LNZ +pcGOPfogGEZzkk/ixdtOh/4nAEYD4o6robbsoz4bV+/Uqzh2lt2GuhHQW/26nxPl6Y2 E1vnj6ujWmoP2jJKYXf0QTwY6xI0xFBGr00Xq5BEtykNMq3g6Bk5YR+htdsky/RVzGGO b7eY6gBaUrQ2yyIUsuO2+Y+9BoQGl9YUzGBZFUy8gtNM/+vXQZbb1GZg/jixBBlUwpDD Rqpw== 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; bh=7ewgK497tKZ08lrgwZUgM6UIlKBBM+1UIsBF+Ydw5NI=; b=X3/WPzXM4l3WUEiOvqnHFVsT+2jp3Cz+BJTBSkgzNZ077qYWa5mM0bNnZz6/BtBzhl MAqpyNQSuqjkQZx/OwIL+bg+bwcQqb3H+ncwRzJLNcMoUxALVBs0brREv/Lx4+aArh94 Ci4lArCN4uAHGZH4bdZ3Sq1kF8CfFG1nkyOdi8CssP8XpG4qzxR00tJhNtr+LYIouuh0 s5g09sSG5w3KUr0pqI6x/ZjoKIPserdjmf7b+m8Wf1GAuatfmPAmvPmo42j3T4Ahzneb bxrw/dvmKUpXRDm9DBO8DlOludW+QIg+3uQFz3iHAlLYgGflO05SS0ehbYhgfreQLmjO TeAA== 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 e17-v6si5433807pgv.615.2018.09.06.12.41.53; Thu, 06 Sep 2018 12:42:08 -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 S1729194AbeIFRvM (ORCPT + 99 others); Thu, 6 Sep 2018 13:51:12 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:21847 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727790AbeIFRvM (ORCPT ); Thu, 6 Sep 2018 13:51:12 -0400 X-UUID: f61f148e3b394a25a02d3be55e2b90b7-20180906 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 612535395; Thu, 06 Sep 2018 21:15:39 +0800 Received: from mtkcas09.mediatek.inc (172.21.101.178) by mtkmbs03n1.mediatek.inc (172.21.101.181) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Thu, 6 Sep 2018 21:15:37 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas09.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Thu, 6 Sep 2018 21:15:37 +0800 From: Jun Gao To: Wolfram Sang CC: , , , , , Jun Gao Subject: [PATCH v3 1/2] i2c: mediatek: Register i2c adapter driver earlier Date: Thu, 6 Sep 2018 21:15:28 +0800 Message-ID: <1536239729-10008-2-git-send-email-jun.gao@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1536239729-10008-1-git-send-email-jun.gao@mediatek.com> References: <1536239729-10008-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 In order not to block the initializations of some i2c 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