From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 83B44C04E87 for ; Thu, 16 May 2019 08:11:45 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 55EB9206A3 for ; Thu, 16 May 2019 08:11:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="IGQldSiV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 55EB9206A3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=tRc12k/j0zC1D5P3Iox2tbG56pgsFfbpXlQtu9Cw3fs=; b=IGQldSiVwzc8oP SzeouDCc8NJ3EYFWEkqiPN8lefG5+8pU5JsF01rx3R2Oky32yBEh6nwqt5NFyv7neN5r5QjmWeHvK x9i9YP5a8NYSvArOeyQReYYNzZ2HNauz6HbYEmiswNmoDo12+T1kVG8IkcxBKLnWF+oqfo2Fuc0PY kYXWXyPStVg1SnpggdjOaxf+x69gWqrXV8aiOB+Is+npJbzeVFhO223HYIG/w8wp0bR5eu0p/hrWl RUGjRAyvus3nEX34BAPVu7Gk5PuBNp+TRsdwh1FxAxznMFchkS/Y8NB9sYwPvHsv0uykwklz4BP1g /2pAu1DqoZU1MX+rORaQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hRBUF-000814-6F; Thu, 16 May 2019 08:11:35 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hRBU3-0007p8-Qs; Thu, 16 May 2019 08:11:26 +0000 X-UUID: d4722b311b474a60ae1c2c2e4b479c00-20190516 X-UUID: d4722b311b474a60ae1c2c2e4b479c00-20190516 Received: from mtkcas68.mediatek.inc [(172.29.94.19)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 1839425121; Thu, 16 May 2019 00:11:17 -0800 Received: from mtkmbs03n1.mediatek.inc (172.21.101.181) by MTKMBS62N1.mediatek.inc (172.29.193.41) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 16 May 2019 01:11:16 -0700 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs03n1.mediatek.inc (172.21.101.181) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 16 May 2019 16:11:14 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Thu, 16 May 2019 16:11:13 +0800 From: Chun-Hung Wu To: Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Rob Herring , Mark Rutland , Matthias Brugger Subject: [PATCH 4/4] iio: auxadc: mediatek: change to subsys_initcall Date: Thu, 16 May 2019 16:10:47 +0800 Message-ID: <1557994247-16739-5-git-send-email-chun-hung.wu@mediatek.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1557994247-16739-1-git-send-email-chun-hung.wu@mediatek.com> References: <1557994247-16739-1-git-send-email-chun-hung.wu@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190516_011123_876186_180E1A62 X-CRM114-Status: UNSURE ( 8.70 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, wsd_upstream@mediatek.com, linux-iio@vger.kernel.org, Chun-Hung Wu , kuohong.wang@mediatek.com, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, peter.wang@mediatek.com, jg_poxu@mediatek.com, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Move auxadc platform_driver_register() from module_init to subsys_initcall because auxadc user drivers are all moudle drivers, need to gurantee auxadc driver ready before module_init. Signed-off-by: Chun-Hung Wu --- drivers/iio/adc/mt6577_auxadc.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/iio/adc/mt6577_auxadc.c b/drivers/iio/adc/mt6577_auxadc.c index 58d7cb2..cb8e3dd 100644 --- a/drivers/iio/adc/mt6577_auxadc.c +++ b/drivers/iio/adc/mt6577_auxadc.c @@ -350,7 +350,19 @@ static int mt6577_auxadc_remove(struct platform_device *pdev) .probe = mt6577_auxadc_probe, .remove = mt6577_auxadc_remove, }; -module_platform_driver(mt6577_auxadc_driver); + +static int __init mt6577_auxadc_init(void) +{ + return platform_driver_register(&mt6577_auxadc_driver); +} + +static void __exit mt6577_auxadc_exit(void) +{ + platform_driver_unregister(&mt6577_auxadc_driver); +} + +subsys_initcall(mt6577_auxadc_init); +module_exit(mt6577_auxadc_exit); MODULE_AUTHOR("Zhiyong Tao "); MODULE_DESCRIPTION("MTK AUXADC Device Driver"); -- 1.9.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel