From patchwork Mon May 23 13:22:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 12859018 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 425DFC433EF for ; Mon, 23 May 2022 13:24:12 +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:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=yB70kNsHXbEVpLbJ1+ZaUbZGIIedqKWfsvbX2TWH8R0=; b=ztswpeUMk92rgk qNa26ZKcTunk89GwAvFknEAQtluaazHzfh7pPw16XoHnd+s16IG7ganBExJ0PsfrFDfzr2g5vQvWe 0afKMtldX0EZQm7BMBFuOPv6+j0fWaDm/Vi8kfEIrfLKZ6/bTfcPZIQc5SwBJf+XIXaSNtoY9qXOr Zt/W+5ksOvuJSJU2Pp7lAacb4xL7p9p3KFtjSX1RsbTCEx/eBwdw3rKGOmNjb+jyoN6Bi0FrnbX/K RANtlhzpv/xAOkwBHpoEfmjAQlGNr2LJ4kHGbOczYSN3PxSGzqTbgTSh6t0k8DMz94lEzmBwZM1q2 WQPeiC7fRJU6hlKR03TA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nt81W-004NAq-QQ; Mon, 23 May 2022 13:23:02 +0000 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nt81Q-004N8Z-Ov for linux-arm-kernel@lists.infradead.org; Mon, 23 May 2022 13:22:58 +0000 Received: by mail-ed1-x533.google.com with SMTP id j4so14681767edq.6 for ; Mon, 23 May 2022 06:22:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=r8WAmC01JdwEuRA91bKXEDq+9uWVDhRFE7DDNgirVT8=; b=W4OGyqHL2ZKqiPmC+Hr840hwTtdA9uiv+Onp5DpklXJb0lXyIYeJM41tvTV/1gafHV VB4Pptl9/AB1PutTxxwALFx6e9yR8tQ9dhA//i04ErhKBRAd2wdY7Guk+uMn85eVN4AA aK3ofPTdLy1pgcJQgFawl51XYJcZXnlp0KaMA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=r8WAmC01JdwEuRA91bKXEDq+9uWVDhRFE7DDNgirVT8=; b=FGr2v0h8JgOXBxJlkg0iwZKp9xlAA82dRTVFdPD4XXoWI2vpXqo76mGpuVobfVdesZ jlj60wUOfjw+4IxrVnmbSyi/+CnRqktzR0aO495aNcZ7atwRkqcMOnZXplKP91h7puN8 8j+zm8m3iDlJOmD2EYyklNLvzaxVUxk5i9BLlHz1tf8fBdW0rcTHpUD7YQ325lRb08iP GD8PjLfAsqB/oR3XcsaOQrtDYoQrxMx/YgOP1+z4MLNyLTmjEBbv1JIEsyN5DQCgMpa9 Izm+CXMv0OeaoRoZogBGrhNQw81ukXfXTjIq8MUjCy2IifvuC51kct50+SajRfDcIdDL VHHA== X-Gm-Message-State: AOAM531wpr4YnJ+EnI9nYduhoLK/MxXO6u+9GJJMvsa5h82hV8OuMZME spRPMIcENwJ5vy6C72CPl4PWSw== X-Google-Smtp-Source: ABdhPJyzCB3wSJCVIQ8lxcYGLb927QLmAjOhNbuxRB+//y0X8LXl4qCJl+xQS+M9DHvE4XqlF/tGcw== X-Received: by 2002:a05:6402:368b:b0:42b:42c7:f63f with SMTP id ej11-20020a056402368b00b0042b42c7f63fmr11364450edb.409.1653312171880; Mon, 23 May 2022 06:22:51 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.pdxnet.pdxeng.ch (host-80-116-90-174.retail.telecomitalia.it. [80.116.90.174]) by smtp.gmail.com with ESMTPSA id cw12-20020a170906c78c00b006fec3b388edsm2249351ejb.95.2022.05.23.06.22.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 06:22:51 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Michael Trimarchi , stable@vger.kernel.org, Fabio Estevam , NXP Linux Team , Pengutronix Kernel Team , Sascha Hauer , Shawn Guo , Vinod Koul , dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2] dmaengine: mxs: fix driver registering Date: Mon, 23 May 2022 15:22:47 +0200 Message-Id: <20220523132247.1429321-1-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220523_062256_873322_2CEABB19 X-CRM114-Status: GOOD ( 13.53 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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) { 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);