From patchwork Tue Jun 14 10:17:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 2064 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 864B93F1D0 for ; Tue, 14 Jun 2022 12:17:58 +0200 (CEST) Received: by mail-ej1-f69.google.com with SMTP id nb10-20020a1709071c8a00b006e8f89863cesf2676422ejc.18 for ; Tue, 14 Jun 2022 03:17:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1655201878; cv=pass; d=google.com; s=arc-20160816; b=I8cfh33I6ltXjhA3ib2NhhA2qTTMh4LTXHWhZXhu2fZgNwkaOUujncES4ejcbhJKHF cJp3+0F9bdJLGvHs+Utv2PThPNwB78FhqRm0VbM32AsnqUBk7t66pgyDwk4/6MSH8Tdg j0yN7SER8Dfi12CvdJsw2rHHdVmfZiiNYU0wJcDDKn1mCgDqzsgjMWG+7gxwfTEMNrW7 wCinLg4JBEaE0uskVRKCkomlWx0zYeUTN2dvxMI6Bj+yW8k30Q/IU2AuTZ1MNL+Xcd1E 1sHescS9FXVOHx9Xt7fHLYNtWUF2/1Cac2zg3IafrqjFh1C26xcfneeTje6MTYbaw/8X J1Fw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:message-id:date:subject:cc:to :from:dkim-signature; bh=6Vdycjk1G0a4uQCejEKrByY0EfzrtOpuRN/+mU++9jE=; b=SiHWa/bLaR1Zk5nnw+nhf2imO4O8VfD2KfPtpHJGngyuuSY85tVYIVtXOse/uuef9e q+kr2qGuqv07O9j9Em3rC7OrgSPGu8APsk5xvlBszDSyS03uYNfkUOZhovPKFRwFq++N myt4E9JCviXrGM3S0LCkzNbKtOgWtB95tLStjhmtd5BL7GXGGzNZWwwZBR8YaFVJLNz4 6sRl+W5kLA1tIcnuMB50bvVIwTp3Fo8G+AkIhV1UsjvPiprbzkZV8yD84qYVJuTgGX/s YREAU3sop1tyBwaK2Kgy80FeUOwLugN0zpGmKMzX68vsQc/WUL1BIUJaqHseVKYyOVxo mh4Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=HWVuub0c; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=6Vdycjk1G0a4uQCejEKrByY0EfzrtOpuRN/+mU++9jE=; b=WK9xXPkdrwjwdWuq4YNLzjRgI6Rg2wxGXtYvoga8A/S2qL6kwx/t2jhRr6i5bJMRoD 4TSdo+NCd7mx74HIUycD1T86XRI0YDfD+pMk3j/ImhVHp1BAjiB0efd+ikTlWYhkf9P1 jt4BhJOemH+U5tYsLkYqb8duN8AGVfRmRk7Pw= 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 :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:x-spam-checked-in-group:list-post:list-help :list-archive:list-unsubscribe; bh=6Vdycjk1G0a4uQCejEKrByY0EfzrtOpuRN/+mU++9jE=; b=McUojnVw8bJiZDsCMLLLIvYfqAJX0gsmcLqRiSaCZ9cmBDsoF1xzoiq/bqJlqbwrbv 5WTJCy3GXk5ONBrBeezqxuGk6ePL4qHhjyCeDIUI5OS4me0oeShfP2Em0M/bMLjLgl1Z 7vqPiYgJ8Gtkzf0IPrum7uscmor18dCg4fdNT3NWOdD6uiT5/pJi0oCxdYKXLVDMw1of f1ujpjZr53I4X7tuW4B7jtfOA8omBHaxlIhKQKiEA1Ri+7Kg8Sf4SCrl4vJELbXvTD8i t9NaZlNWvzMi51CwVLK5dU0w//xEhrWPLTFI5FhUIxy462eIxebE8HYemVZH8asp9yA4 1oWA== X-Gm-Message-State: AOAM530Zny03EIaBk0Pt//ZxaM6lslOAqWx/Eb8b2cA0sQKBWh9ekWeR GV6M4zihxkkKQyDQLyCXokF9Y2FW X-Google-Smtp-Source: ABdhPJw7+R2bhp1g6dQ0zrTL3VAFzr2lcuAMFgUwC3qF2TrEJC+2b4Cx/8lqr6vtHVlSNDLMrpKrrg== X-Received: by 2002:a17:907:8195:b0:710:b40:95d2 with SMTP id iy21-20020a170907819500b007100b4095d2mr3568553ejc.604.1655201878175; Tue, 14 Jun 2022 03:17:58 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:906:2ad6:b0:6fe:976a:7a5 with SMTP id m22-20020a1709062ad600b006fe976a07a5ls845953eje.7.gmail; Tue, 14 Jun 2022 03:17:57 -0700 (PDT) X-Received: by 2002:a17:906:3ed5:b0:6f5:108c:a45 with SMTP id d21-20020a1709063ed500b006f5108c0a45mr3532212ejj.623.1655201877008; Tue, 14 Jun 2022 03:17:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655201877; cv=none; d=google.com; s=arc-20160816; b=IxWJnp0ZP328b1hCkA0sTQRHjBSh5IQu97QwHYz7uyHv8JGWb0pm/RLO9GT3fVUykR dlwRUR+otq8ugttj30dksB/ODycJ5Z5TQZTKCe+KODsWPK7euWrnelYOVkyQLWPk7iGr kNs7G3KXKhvzJn9epqzyjqf6n/4eZZB+wND6rih44326yuy30nJ0z/rgrGdh02tyVGNE eIRkrFxrRf4pboOy1s+7w6jf5cbRR9XiQTVKAfi8lgt5v8Ps3AoA3aF6JGNAii1VYPYi 1woSBXOpo7y8sRYDLCG+JK8tMvIT+Ud7TXwmaSDiWgTeYxY9Rp7C+OJOntI9gMrQmknw b7gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=7A7nTmdaI9/bcr+2R0SqLAb+aR5IHo7VJJCTzS5ZF6s=; b=UOujlYdRZmqxkkktJM542cqGTnEVyvQvyaUORLnO8Sh2cf021ccxs4UKGVAEw7DfU5 VSZZeJDXu2OJWWKRRoX4H1nNeUa7U5wo+nF4Hf20y2DpS2TOAc1h7cS5JcEshnI3exWp tGL/kD2COfWuBlLKbt87piOAiFaoX17EtA86uJOhT6mE0qOnP7LxUdNRkT4WvWza9N/S XVZfTMW2lSKG3kP74yUl5g/YzbQbIH48DLE0ai8XXmnp2ZLrQszgoxigA1OQEOH79dZS oks93rc8c4cBRO2FfYqXZgxWW/ut+IrKKrtrR/CBlR3uvmxGiUrWTNaT8KFz+9QJqxMW mlFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=HWVuub0c; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id gg2-20020a170906e28200b006fe8d2e8599sor3130237ejb.29.2022.06.14.03.17.56 for (Google Transport Security); Tue, 14 Jun 2022 03:17:56 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a17:907:d24:b0:712:1142:88c7 with SMTP id gn36-20020a1709070d2400b00712114288c7mr3673468ejc.435.1655201876750; Tue, 14 Jun 2022 03:17:56 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com (host-80-116-90-174.pool80116.interbusiness.it. [80.116.90.174]) by smtp.gmail.com with ESMTPSA id dx6-20020a170906a84600b007094f98788csm4878838ejb.113.2022.06.14.03.17.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jun 2022 03:17:56 -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 v3] dmaengine: mxs: fix driver registering Date: Tue, 14 Jun 2022 12:17:51 +0200 Message-Id: <20220614101751.3636028-1-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=HWVuub0c; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 Acked-by: Sascha Hauer --- 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 | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/dma/mxs-dma.c b/drivers/dma/mxs-dma.c index 994fc4d2aca4..6e90540fedc4 100644 --- a/drivers/dma/mxs-dma.c +++ b/drivers/dma/mxs-dma.c @@ -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);