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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 66C1BC433EF for ; Wed, 6 Jul 2022 05:59:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=/AWS8OJaOqSo6j3o2l6pC7lMpGbe0XaI6BaU5rJr7lg=; b=3Hh/0z1HhXai+E lNvd6IRvQQ+q5DI/zFEU2hy3PWfx9IXnHbBfY7yE5eBTr1qA5tAa4uPUVHQSfMUxa3FWNbqolnr6g VTv05+ZCgP5NgyRtgu9Z1tXT9hSvNBEPXxQh2A6uH5LHCkcKcDeO7bWpZt+tZZnFo8IAVaGPwuzJK 1aumXZWUr/TLeYUMR0zSW0Y/xA6wqM+u7k24ZmD8KPPVkm6h+gF6ecSuaSaxZr2QvXpfv2bUad3qT Rts8JszGG2tvwwie4MOFgdqri07bNZ2x/PZjrCRHIPYcMJ3xrqfU5nRnWSs35WdDxLE71yf/2F/ps tKQ+QR58xOWeSjFfgxaQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o8y3P-006Qw8-7s; Wed, 06 Jul 2022 05:58:27 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o8y3K-006QsT-OG for linux-arm-kernel@lists.infradead.org; Wed, 06 Jul 2022 05:58:24 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5AEC061D1B; Wed, 6 Jul 2022 05:58:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E0D38C341C0; Wed, 6 Jul 2022 05:58:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1657087101; bh=x5rdNaA7jxDXFflwQxwmKDOgRnnU8SdteU9MiDOP+mU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=GONWvW/bUf+5bM/x3TOItlAGDjJl/YXD0eLmvYki8dcUsPtkZoQNa+ipnArq3v4l/ XJRGDjrU1FlEk/sHspRfADeLSEs3C4sLK9Il612wZQ9/YXY2eiEupFfepElS2Ud5eU iT4qwIKKvZgBjETDft+CcNwo7plf1nKwoDcn8RGYN5nWCkB/60KnlFH9axFNnznsQO xan8uKsDz9kkXu4n1WmM2Z6b+5c86K/2TL4RxedrTrxpV5E0SPo10iV18BPVuobT/q io0DSgoq1+lBnIwPt1Re+avRaCVMST2FSN7mKy2tPaxsO9vTznzis/qmtLw3ISo/k/ aM+2//10G/iXQ== Date: Wed, 6 Jul 2022 11:28:17 +0530 From: Vinod Koul To: Dario Binacchi Cc: linux-kernel@vger.kernel.org, linux-amarula@amarulasolutions.com, Michael Trimarchi , stable@vger.kernel.org, Fabio Estevam , NXP Linux Team , Pengutronix Kernel Team , Sascha Hauer , Shawn Guo , dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v4] dmaengine: mxs: fix driver registering Message-ID: References: <20220621123659.1329854-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220621123659.1329854-1-dario.binacchi@amarulasolutions.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220705_225822_909438_0ED28B13 X-CRM114-Status: GOOD ( 27.04 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 21-06-22, 14:36, Dario Binacchi wrote: > Driver registration fails on SOC imx8mn as its supplier, the clock > control module, is not ready. Since platform_driver_probe(), as > reported by its description, is incompatible with deferred probing, > we have to use platform_driver_register(). Pls revise title to reflect the changes added and not the effect Btw lots of driver work like this, they use platform_driver_probe() but make the clk and other resources do earlier init levels. This change is fine too... > The addition of the `_probe' suffix to the `mxs_dma_driver' variable was > suggested by the following modpost warning: > > WARNING: modpost: vmlinux.o(.data+0xa3900): Section mismatch in reference from the variable mxs_dma_driver to the function .init.text:mxs_dma_probe() > The variable mxs_dma_driver references > the function __init mxs_dma_probe() > If the reference is valid then annotate the > variable with __init* or __refdata (see linux/init.h) or name the variable: > *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console that should be always a separate patch > > Fixes: a580b8c5429a ("dmaengine: mxs-dma: add dma support for i.MX23/28") > Co-developed-by: Michael Trimarchi > Signed-off-by: Michael Trimarchi > Signed-off-by: Dario Binacchi > Cc: stable@vger.kernel.org > > --- > > Changes in v4: > - Restore __init in front of mxs_dma_probe() definition. > - Rename the mxs_dma_driver variable to mxs_dma_driver_probe. > - Update the commit message. > - Use builtin_platform_driver() instead of module_platform_driver(). > > Changes in v3: > - Restore __init in front of mxs_dma_init() definition. > > Changes in v2: > - Add the tag "Cc: stable@vger.kernel.org" in the sign-off area. > > drivers/dma/mxs-dma.c | 10 +++------- > 1 file changed, 3 insertions(+), 7 deletions(-) > > diff --git a/drivers/dma/mxs-dma.c b/drivers/dma/mxs-dma.c > index 994fc4d2aca4..4c878bf1e092 100644 > --- a/drivers/dma/mxs-dma.c > +++ b/drivers/dma/mxs-dma.c > @@ -834,15 +834,11 @@ static int __init mxs_dma_probe(struct platform_device *pdev) > return 0; > } > > -static struct platform_driver mxs_dma_driver = { > +static struct platform_driver mxs_dma_driver_probe = { > .driver = { > .name = "mxs-dma", > .of_match_table = mxs_dma_dt_ids, > }, > + .probe = mxs_dma_probe, > }; > - > -static int __init mxs_dma_module_init(void) > -{ > - return platform_driver_probe(&mxs_dma_driver, mxs_dma_probe); > -} > -subsys_initcall(mxs_dma_module_init); > +builtin_platform_driver(mxs_dma_driver_probe); > -- > 2.32.0 -- ~Vinod _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel