From patchwork Tue Jul 12 16:09:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 2106 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 7D6033F066 for ; Tue, 12 Jul 2022 18:11:33 +0200 (CEST) Received: by mail-ed1-f69.google.com with SMTP id y18-20020a056402441200b0043564cdf765sf6497142eda.11 for ; Tue, 12 Jul 2022 09:11:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1657642293; cv=pass; d=google.com; s=arc-20160816; b=Qal1WdFpU0vnWaViiYq+Ng7EfvvGmCNM0ame8ntQSbn4HLncU8w/us1hkEhX2kWTA5 sVAB/SMU/jW6CN8BdFOTozZs0WXaV/hNm86hM5jBghVrCjGI/YOzEqzVyeIFHHayg6e7 O680sBqdQTkhElzCcEnYzSpy5zP2rMaWIkzhGuGxaYoAqSBdVvkh230ApTP8r/w1L0t9 PiJHTxLZniz17VnBXNgWK6MW9/BUrY9zX3/3IsFThmoBqonqOMfWky4qAaDnj7IDEzi4 yEzeU7z+gYJ4lzVhHbe2aNk++gYM0FUzaTvrTQJsthhtLPGfp5PJV7FesGLpQr9JYhF2 48dA== 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=CVN9UVe8Rz1oTKTcFS8dC8nKd1r74OnH4LUEzYhpRaI=; b=cz1iLSwa2bkNMoCxHZ9FpIPVoypWjkyq0foDkkJsBSnpsEYm7/DmCxCTKRFp/+z9Os qew8u+EU4QHQ2AkWV5QXeq9i4+y9hIDH0+oLRrGFFgYt+dFlwwR5ZYHnSl/keX1iTdqO 9OMdWgOUODISi8RM1/hiU1juyddw8JO3yyplXdTfTGKOqFvtailWXUzjaE71Mg154OQH X9XllBoleruERghBWVcWf/P3HlpKda1lAlPiTWhgtTeVKe3scOVYPeaXO0AsDbaR2tuN ikUXYLUcF2esIGlnhXO1H0vlVUoAC7lLUhllWT92k8KyyUBnjiMsCspnakSQflWksDsR j16g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=pI3NbHHj; 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=CVN9UVe8Rz1oTKTcFS8dC8nKd1r74OnH4LUEzYhpRaI=; b=lLhvTQ/DsaKZbd/s8DQOgq578f9yiGxRqoQsr6TI4pLBgCPtIUGmJGHKQRZtFSqHuq 7ZrNpr43ll5gzhcKZ/C44UhW5Uwp93pKjvnSJbOkUB1daFf0hfovcPUeSidR1vQwjGJf Bo6fkT6YQB7Gf0nKn+hPEPRnKhgaL92Oetmus= 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=CVN9UVe8Rz1oTKTcFS8dC8nKd1r74OnH4LUEzYhpRaI=; b=3NRCLp1GLj+mVP7dW02dAqE8dHu2Q8ULR89tZ/qSbewzUri44BU61W5kHB0gDk8O16 ButlPqJvpHOKw6Q/oYzgUH3V2/glz/sOml5UrmkkFSaiTwwtZgKQ86qZEKyAbTa1ijt1 WNZDspfZDpTXJqaNQz0pcojKlO7IUv+1Eu9olxdyhPqytQh7cXcCX0D5Y4ALJR6RX9ML 1IW1ppO33LP8u5RKR8hKXbH8ktDrPqyFa0+PnAEmmWD75eRuElGHtg2gEQ2nyrKS6vbI 4kQdeL2RMyF4lXW+7B4leXwQAphn/dRlFWHUc/luSkpRuJqbWEB8FfgV65Cd0kYYwuQv qlww== X-Gm-Message-State: AJIora8cnP8TWNGlM5WXAxKHd3xt5N7FOa4OXh9IJx0sRiOs9+6jd2gx 3GPBEZUFgGw7ItV/Ox+idkZ6uSlg X-Google-Smtp-Source: AGRyM1uRWhQL+fwUp4SmsKWzknj7BgQAbT4iLPEelBHUBzBDzs4Q+2/npQws9WXMFXkDdm8RgoX7nA== X-Received: by 2002:aa7:c98f:0:b0:43a:71c2:3f7e with SMTP id c15-20020aa7c98f000000b0043a71c23f7emr33259732edt.60.1657642293140; Tue, 12 Jul 2022 09:11:33 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:906:2ad6:b0:6fe:976a:7a5 with SMTP id m22-20020a1709062ad600b006fe976a07a5ls1710286eje.7.gmail; Tue, 12 Jul 2022 09:11:32 -0700 (PDT) X-Received: by 2002:a17:906:c5:b0:722:e65d:770d with SMTP id 5-20020a17090600c500b00722e65d770dmr24603735eji.330.1657642292004; Tue, 12 Jul 2022 09:11:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657642292; cv=none; d=google.com; s=arc-20160816; b=dMzGCumGycrnfsbLbdydL0jEn+TccNqZhtZ3yZ93wITpNXLZqbj4nzcSvUUA9cz9NW 3o8k6mKg/kB7KMN70NI5KOn+a6yqQ9L+JusN61Jak0vW+CS6gmW+AEHPqlQqYNLMoq8/ h3UODT33XcHRl+Mdsb2ZkrucSeQ1JsTVKYEqA4oia5hwlVUZozyJMIZ08H6QxIGQYLew SpztcvwSu/w00ZqsZVoZZajOjk/dH67ngPQGfqdXAr7WHcWFQa6O2HixYkuLNFvUVvLK 7/z5VX89SPnIV8dpzmEW21A2y/HpHdGk8iMUEqxAKPff2PbuO4mNiJlswu/mL3Lyhf4E 4WPA== 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=21nZyc3bYwF/2+gU25HHeO3ZzKasf2bJUi7S16b1eWU=; b=iQOcwGE8vG3h6HvqAA73b086RZPTn2zkzWTfry2wDlBm5ZEkna+F//NfB8roktn4td fuefiJvU75ujR1wks/QPyezHhsbB2B9nj32JgjcXy0pgL54nGodMMLGgVjB0IXOeWgHZ Tn5NE9g/52fpgzxt5RW5JY+8t2P+wAf+4xfPmuOsDOU8pat2milePjeiXpVBvf/Dswgs WXdhaRc+rJ23rc/5GU6+QY8XzsCtkF2GSogvssqxFugAbaDiYbz33H90XARI/XPsYIOi dYw9pVqf9mtEaAZBvtgpDcCqPX88qf3KQanUmOdpxkCjj3d5nbshpzOdbYzugX392jib /1XQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=pI3NbHHj; 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 si13-20020a170906cecd00b0072a9a56d2a1sor2939540ejb.129.2022.07.12.09.11.31 for (Google Transport Security); Tue, 12 Jul 2022 09:11:31 -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:906:938a:b0:726:942a:54e8 with SMTP id l10-20020a170906938a00b00726942a54e8mr24075139ejx.225.1657642291745; Tue, 12 Jul 2022 09:11:31 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-80-116-90-174.retail.telecomitalia.it. [80.116.90.174]) by smtp.gmail.com with ESMTPSA id h4-20020a1709066d8400b00722ea7a7febsm3911498ejt.194.2022.07.12.09.11.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jul 2022 09:11:31 -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 v5 1/2] dmaengine: mxs: use platform_driver_register Date: Tue, 12 Jul 2022 18:09:07 +0200 Message-Id: <20220712160909.2054141-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=pI3NbHHj; 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 probed later than subsys initcall level. This driver uses platform_driver_probe which is not compatible with deferred probing and won't be probed again later if probe function fails due to clock not being available at that time. This patch replaces the use of platform_driver_probe with platform_driver_register which will allow probing the driver later again when the clock control module will be available. 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 v5: - Update the commit message. - Create a new patch to remove the warning generated by this patch. 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 | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/dma/mxs-dma.c b/drivers/dma/mxs-dma.c index 994fc4d2aca4..18f8154b859b 100644 --- a/drivers/dma/mxs-dma.c +++ b/drivers/dma/mxs-dma.c @@ -839,10 +839,6 @@ 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); +builtin_platform_driver(mxs_dma_driver);