From patchwork Tue Jun 7 09:58:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 2027 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 6CEFE3F066 for ; Tue, 7 Jun 2022 11:58:40 +0200 (CEST) Received: by mail-wr1-f69.google.com with SMTP id bw25-20020a0560001f9900b002175d64fd29sf1811430wrb.9 for ; Tue, 07 Jun 2022 02:58:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1654595920; cv=pass; d=google.com; s=arc-20160816; b=h6zRGVRHP4CaPA9M1LheMiWJborKFM4fxAjZRT/otnzUgILFFm+M6xj9cpmZlk1rdp p4N7Vu0a7wQOitBhMSlQx4AaHM3Q0oOesxVdMnWdTeBoGkrSe6yTlVK9c1Pd9dKwFswK XYeUTTOgBXxEHcDCKTaIt+ds3rdoq7qWzmD8MRGKrepBHpieti0LbvkvytMA4jMPBbm0 t82lTn05/3tP2MwEnYdYM3xMETSQCF8CewMOb9FoBH2CK/Y7yctBc89Ewv2TbLI5sApY jjB0eOTD2p2DmOlQNvp74qOAAcLRH8Q7PWVK1hQy4M2/r/+F7RkK08u2uu3FYVsenskK lwHA== 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=br6yLSqkjxiooBvz18M48yePWfVrS4zxVPqtRjfTIew=; b=h5M3UXxpqhMqRe157GEGZuAa/2+U0My5WnlNak5+szGw2SKpz8zElT34jUOWcV7Ao+ 0vOP7SWR4Z/62sRCwFvGcvMScxe6oqtUuwK2/l0utL+qrv7BPZz0z0eX1BsfNA03gztK cE1+RsMoJu2vr3GuOFs1z/O3f9Zyex1wjz8vMZC2MSjmvBOnO99zFQLcbuv1DrkIatJE xDerY7Pseqrh4h+TOb3k5O6kNL2bowrlzUWzFXBZOeH0FXggcKGiMOt3zikoOEBy7yFP XleZ/YFvkD6RhNW3q4KO2gzSJujbEMu/t5uFNhQiW051S5xomKQMJjLX9wABinZGc13/ JooA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=E7D78HbC; 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=br6yLSqkjxiooBvz18M48yePWfVrS4zxVPqtRjfTIew=; b=R3FrYJDNVKENauB/L9OxEp1JuutDXU5TbO4jEM3O+pDTodIuFzu4clz8k2KQyFd6ZI p/acxf4Bq0UML7FJ4rErFwne56hvwVmb8VKeXhzLMUxqN66BnvoJuSxaUK/aUUpDuzgA EvRyxbjM63Igk9fG69yKd7DPtAGlC55MVML3w= 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=br6yLSqkjxiooBvz18M48yePWfVrS4zxVPqtRjfTIew=; b=5jdwh3wyP0gfYt0g9iWaKti/H7n8CGe/h+pgmbr+U4Y75e7klazEVVYaY02j0x+KxX zaNZBAiCJRTDLDlfgfpJwYHGg4gwYFO2OELD8XR1o/qb+rFcnaHv+/ZDaIHGbzzosHRL AFDQSCeI+yQJYDI4qCkpD27OOpoAbef/4SlzrcDTHJfSFIDcv94b2fSd429M5PyryMi2 l7hhrUOWOjRunLekInaCMHlwdwiNe73avXSD9E4EfO2TG07z8WRS6of9N84t9ubocSrp BEt42Tgi2ojtd+lBP+EiosdYI93WQDH9ZM3VHh1IRvRXWywOa9fwiL6sDDwfhPbCXz8X Izqw== X-Gm-Message-State: AOAM533v7sfzBmw3nBDjCcG2FU6og8qIq+HW6E6Mmy4XNt8KhVY1UW6D 7EWqGxmjF1VSLbN0mOK517JDAbzi X-Google-Smtp-Source: ABdhPJwdvO8dmokCGcgCDd3kmgsBMedCnLkyS2MofI2khW7MNRxVozxG1CiA88neoM2Sqt6Aw0lB7w== X-Received: by 2002:a05:600c:4e51:b0:39c:4f18:4c29 with SMTP id e17-20020a05600c4e5100b0039c4f184c29mr10500140wmq.101.1654595920141; Tue, 07 Jun 2022 02:58:40 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a5d:6dab:0:b0:212:d9db:a98 with SMTP id u11-20020a5d6dab000000b00212d9db0a98ls4196871wrs.3.gmail; Tue, 07 Jun 2022 02:58:39 -0700 (PDT) X-Received: by 2002:adf:e347:0:b0:217:6f4b:f3d6 with SMTP id n7-20020adfe347000000b002176f4bf3d6mr12983110wrj.73.1654595919099; Tue, 07 Jun 2022 02:58:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654595919; cv=none; d=google.com; s=arc-20160816; b=H3c/5OKoYestlNJyuPOmaq7Vkpa5oL4If5LwqGkgxJLMY5LPFo3Wlq0DLcpWOMnSO3 kiVLIXsJb4rgSiCglQqrZLh1arYo1kkHRhTuJMW53nQCwaE3lpcslhDLW6/CU5U2VA2h T7T8iphHL/K06f9nnQoOigXKoKKy3BT/oj0xmyz3QoLPFN4hko8ljXOfMW/vk/ujnAgg 8YSFTgaexo8gXWeSw5jp4vEHUexu4bP1A8eW6d2X9/HRUl4Kh6N/Km3nSec+1pF6LlNs hfO3HIHo+kFdi5OkMk0nd1RSehBvbE7WSvrFIZKH131h/wTGKLC5JBvaNYqgYDBh1WFn XYjw== 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=r8WAmC01JdwEuRA91bKXEDq+9uWVDhRFE7DDNgirVT8=; b=cQUi7lmE4fbu3omCnmoixOkwBHtHlqfJ6J7obnX5eU4+zp9ce8PBO41mKkdn0L3N9P sQG5Lfx4EL2MvJKgATZShIFyB04uAaAOwu4Fzqc7fhMyK1hYSJS4UezVuqL2cg6lcFwY 1RppFdmD3HaOD0vbENe5DpEqNVHitmKG2zxbc8cb2s9NVXsFJOiTsVmfitoYT3q2xaYt 212XUYabC6aPuI0Gu0jYz+pI1t+kryaGi2fS0bHk5go2xyVfpEQmyklvHteLZ/3Flm4d SKdzx06/uXvPyR7QMbHg/imF/emwWWIiOsVNhnDQdml0/Jh9NHExaDO/IcKz/qrf7OO2 xLmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=E7D78HbC; 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 k2-20020a5d66c2000000b0020ffb15ca7asor10294554wrw.57.2022.06.07.02.58.39 for (Google Transport Security); Tue, 07 Jun 2022 02:58:39 -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:a05:6000:1d86:b0:218:3cfc:4ca2 with SMTP id bk6-20020a0560001d8600b002183cfc4ca2mr10765322wrb.133.1654595918844; Tue, 07 Jun 2022 02:58:38 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.pdxnet.pdxeng.ch (mob-5-90-137-51.net.vodafone.it. [5.90.137.51]) by smtp.gmail.com with ESMTPSA id c186-20020a1c35c3000000b0039bc95cf4b2sm19958382wma.11.2022.06.07.02.58.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 02:58:38 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Amarula patchwork , michael@amarulasolutions.com, Dario Binacchi , 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: [RESEND PATCH v2] dmaengine: mxs: fix driver registering Date: Tue, 7 Jun 2022 11:58:29 +0200 Message-Id: <20220607095829.1035903-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=E7D78HbC; 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 --- 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);