From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758571AbcAKFu6 (ORCPT ); Mon, 11 Jan 2016 00:50:58 -0500 Received: from mail-wm0-f46.google.com ([74.125.82.46]:36492 "EHLO mail-wm0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758402AbcAKFtg (ORCPT ); Mon, 11 Jan 2016 00:49:36 -0500 Date: Mon, 11 Jan 2016 05:49:32 +0000 From: Lee Jones To: Henry Chen Cc: Samuel Ortiz , Matthias Brugger , Sascha Hauer , Flora Fu , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: Re: [PATCH] mfd: mt6397: convert to arch_initcall Message-ID: <20160111054932.GH3331@x1> References: <1450862711-22124-1-git-send-email-henryc.chen@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1450862711-22124-1-git-send-email-henryc.chen@mediatek.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 23 Dec 2015, Henry Chen wrote: > Since pinctrl or regulator of mt6396 need to initialize earlier to avoid > probe deferring, also change the core driver to arch_init. This is exactly what deferring probe was designed for; so that you don't have to mess around with initcall ordering. > Signed-off-by: Henry Chen > --- > drivers/mfd/mt6397-core.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c > index 1749c1c..af98b4b 100644 > --- a/drivers/mfd/mt6397-core.c > +++ b/drivers/mfd/mt6397-core.c > @@ -285,7 +285,11 @@ static struct platform_driver mt6397_driver = { > }, > }; > > -module_platform_driver(mt6397_driver); > +static int __init mt6397_core_init(void) > +{ > + return platform_driver_register(&mt6397_driver); > +} > +arch_initcall(mt6397_core_init); > > MODULE_AUTHOR("Flora Fu, MediaTek"); > MODULE_DESCRIPTION("Driver for MediaTek MT6397 PMIC"); -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog