Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp280240imm; Fri, 6 Jul 2018 19:51:12 -0700 (PDT) X-Google-Smtp-Source: AAOMgpelkzz7s6/Zx9I8IhKNbbKKd7urPgPbG3q/ZnT0EHq+aewwvrxmSQjDX3cn3B0AZpI+nyoR X-Received: by 2002:a17:902:3041:: with SMTP id u59-v6mr12405293plb.208.1530931872112; Fri, 06 Jul 2018 19:51:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530931872; cv=none; d=google.com; s=arc-20160816; b=ikBOgfWpyt1mVWgyMwnB6idtVBzuri4MMXq5wcXVuPDRZcGYpzWLh15uMQpcZWPu2x n5Cd4YH3/RIg4ik345n2Edgp8ASbaZ2fh2qm1sosyvPQVLXAIBN1yiWHYIpyHrA3KED9 o0hVQfiwRBqr6u9H2X0lIfJDjy6Iszgl9kjP2py2kiAPqipUDo68jbeYjyIK7wB15O57 UjUdt+VUbaBWiMnA3jmlUwgWCmtYzJwxTUF6iXU4BLVsFgqYmCQWfwzaj4Yzgr/8jidg AE708+48hBXXXdmdes6ZZo/TXHA9JEjwMKFBlum3WnLkZLXalgiUvsXn32I9QN4iVRnY 8G6w== 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=OOZtjeVEp5T3vYJAaWGZ+uxDahabEt54LTMAtUbSGQxMMoF+RXayig+dcFNGiUOydv +AFpxvTlw0k1T7J0YPTA41P/g3T2WNCjELoi6Y7nRqCeuUasninhwmUvWbql2YsELGYI ofX//BWASP7+MjOcXxZI3ej66o9AZ5+sr24JbVoChsdE7M4o5XzYODUo9XVWYwC/K3gn ljNdjxqEPXywkhHUF02wjDWD4XQt770KY1ARasQg5yGSg6vlWxBpqlE1Bx+jJaDEIQWR xnduc9J1aVBgN6ROdLUKUCMl9cyAZ6q6PeF8nI+WxqIkL2xPBuk1M2hit2nk0uc4NHeZ ZXVQ== 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 h1-v6si9839503pll.416.2018.07.06.19.50.58; Fri, 06 Jul 2018 19:51:12 -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 S933087AbeGGCts (ORCPT + 99 others); Fri, 6 Jul 2018 22:49:48 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:50693 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S932834AbeGGCto (ORCPT ); Fri, 6 Jul 2018 22:49:44 -0400 X-UUID: a556ab8b0e774ec4afa4f9e089f9520f-20180707 Received: from mtkcas07.mediatek.inc [(172.21.101.84)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 462900872; Sat, 07 Jul 2018 10:49:35 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs03n1.mediatek.inc (172.21.101.181) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Sat, 7 Jul 2018 10:49:34 +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 10:49:33 +0800 From: Jun Gao To: Wolfram Sang CC: , , , , , , Jun Gao Subject: [PATCH 1/3] i2c: mediatek: Register i2c adapter driver earlier Date: Sat, 7 Jul 2018 10:49:11 +0800 Message-ID: <1530931753-8264-2-git-send-email-jun.gao@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1530931753-8264-1-git-send-email-jun.gao@mediatek.com> References: <1530931753-8264-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