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 ECE15C433EF for ; Thu, 9 Jun 2022 06:08:22 +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=RjLOcUSloUABgYI9czKchtJtbZewUHVGfCqNP7Zrxuk=; b=q1yFeZV+bmc5P0 yk4Gn6yZMQoEqXpgyJIyJPC+gHmR0HW7gyA+MH3uqbB3R3Tqv8yLn6R0f5QLUQxNrMuts1rID6vHg Dm1Mwcei0v5/GEIvELRRIMibUWrLfw4iZwhoaJhoNc0cVXbktw9lCXWNiP0X13ahIvHXXYDZrlls/ UWLmXZjp0655F3sHwDsJHc1AxhkwhE3RQ6AmzZC+HxiVOWN0iMvlbZcL5xrmKFk6MOOtpVWMz+kRc JG9JiILKjov3/OGs6VEKUNv/N62Sa/2Y0GkbjsELbnKBWghDLLqj0FPwB+cTO1eOJ3oybN09pPJU+ 5dJP/ClIpbxLQ88Bk7Ew==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzBKD-00Gzfh-2G; Thu, 09 Jun 2022 06:07:21 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzBK8-00Gzdx-HR for linux-arm-kernel@lists.infradead.org; Thu, 09 Jun 2022 06:07:18 +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 ams.source.kernel.org (Postfix) with ESMTPS id B2B62B82B7D; Thu, 9 Jun 2022 06:07:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 781E2C34114; Thu, 9 Jun 2022 06:07:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1654754833; bh=wYbwwJ+Aa+HpKBoymvEz/JHg6apC+/opk1EDP3A0QfI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=i8ygFyHyqvX/0nadMHVjSaMWmmk3FjVdojRZ+zovP5wvdC7zoeu9imws2SgVNDy/Y kQT89YpEDHpTkfhifdyLQyo/aGoA/mOI+8Hn14MCak9Vhbjyju86e6HvJloT/0dTmu j4gMA7WjcK7IWNOy/h0me6WJMmG6Q2c4z4CWFjY/qwDZPTwCEYL55UOZ2zPTBvPv8v S69x4O9Iw8z9mumUdS71+s3+RWtvcXL1sCrosaZwSrbckGJ3YIMCK4R1Qh2DUv1vkO DGQGKKfKinLaYKjwpBsIrvaE0n7Svl1AYvkinQugbEosbfwIte8EbjR+z3cYPMdHUh KfTlMB2ihpFtw== Date: Thu, 9 Jun 2022 11:37:08 +0530 From: Vinod Koul To: Michael Nazzareno Trimarchi Cc: Dario Binacchi , linux-kernel@vger.kernel.org, Amarula patchwork , 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: [RESEND PATCH v2] dmaengine: mxs: fix driver registering Message-ID: References: <20220607095829.1035903-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220608_230716_901829_4DBFF803 X-CRM114-Status: GOOD ( 27.44 ) 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 09-06-22, 08:01, Michael Nazzareno Trimarchi wrote: > Hi > > On Thu, Jun 9, 2022 at 7:48 AM Vinod Koul wrote: > > > > On 07-06-22, 11:58, 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(). > > > > > > 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 v2: > > > - Add the tag "Cc: stable@vger.kernel.org" in the sign-off area. > > > > > > drivers/dma/mxs-dma.c | 11 ++++------- > > > 1 file changed, 4 insertions(+), 7 deletions(-) > > > > > > diff --git a/drivers/dma/mxs-dma.c b/drivers/dma/mxs-dma.c > > > index 994fc4d2aca4..b8a3e692330d 100644 > > > --- a/drivers/dma/mxs-dma.c > > > +++ b/drivers/dma/mxs-dma.c > > > @@ -670,7 +670,7 @@ static enum dma_status mxs_dma_tx_status(struct dma_chan *chan, > > > return mxs_chan->status; > > > } > > > > > > -static int __init mxs_dma_init(struct mxs_dma_engine *mxs_dma) > > > +static int mxs_dma_init(struct mxs_dma_engine *mxs_dma) > > > > why drop __init for these...? > > > > I think that you refer to the fact that it can not be compiled as a > module, am I right? It is still declared as a module_platform_driver... From changelog I can understand that you are changing init level from subsys to module (in fact clocks should be moved up as arch level and dmaengine users as module) ... But why remove __init declaration from these? Whatever purpose that may solve needs to be documented in changelog and perhaps a different patch > > Michael > > > > { > > > int ret; > > > > > > @@ -741,7 +741,7 @@ static struct dma_chan *mxs_dma_xlate(struct of_phandle_args *dma_spec, > > > ofdma->of_node); > > > } > > > > > > -static int __init mxs_dma_probe(struct platform_device *pdev) > > > +static int mxs_dma_probe(struct platform_device *pdev) > > > { > > > struct device_node *np = pdev->dev.of_node; > > > const struct mxs_dma_type *dma_type; > > > @@ -839,10 +839,7 @@ static struct platform_driver mxs_dma_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); > > > +module_platform_driver(mxs_dma_driver); > > > -- > > > 2.32.0 > > > > -- > > ~Vinod -- ~Vinod _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel