Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp195972rwa; Sat, 20 Aug 2022 01:50:28 -0700 (PDT) X-Google-Smtp-Source: AA6agR4/lv3S80rD7X4tcOJvTe0tCzPfKYd38jC6uDWsNR48EFEEyi2XxfkDd+WG/34twiqDLvwp X-Received: by 2002:a17:902:ea06:b0:16f:8ef5:fcab with SMTP id s6-20020a170902ea0600b0016f8ef5fcabmr11112733plg.69.1660985428257; Sat, 20 Aug 2022 01:50:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660985428; cv=none; d=google.com; s=arc-20160816; b=qTOBMxcIX69VepgUSNHjNbp/xhxVTC9VsxD6Z1AYE5snaNdYUIzR3r4+H6+GcwgLr9 5fr5qxp5JRsNwBz+wGbGA81F+gJGfrkHg6sr6S0o75okIbY4NJfGpg7zyVjytHq4aouM BTSIiiVuqzlAV3XMj5CnzDEdIQAaGbIKtW52yWHlVTCzZ4OT5K9n2d8GyPYXlxROeM/o RUUOzFma3JILUwsgtF6cYkGgbIKRcsahImQib1AHqOfxOuArIMAC4kYx50xnUl4FDT9F tGmCVw1Cw2kAeak54DSgANvl9u0Le0Qo/YDshCJrDinkQix0BgwzUR4LCyu7McWd+86/ ixrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=C3neU1AtxmqWdDSuYqkB7lF7A3shUmwSCsbgD00NRVo=; b=ID9Of7Zm67cvg1n8hAQ56lofcaYXwuGF78LlBkT+A/Vy1WKeKaxL6nuZVrSAuaVdLu vZtD/aPyVQopEw1moM7cLlu02T4dqxiU8vygnixLkD/ERBDmlyV+ftx+QOBQz5EA6+tF xvm5o3DJ659Z7FtZX47Jcxu4QtrZhkhEqEWA6DRIdFYLcg5sJwK1TEMMGz1+FVS3YA2z eee/bkS49kaBR8AqU2VhuXisaayXJesDVTjB9UlSiB/VirRMXTiAQfshDqxC2NvhoZjB L3VplitYFOBUaVSU/yhtkSmU36OzA908NOLcQuo+WE553Kcrfn7do75voXx+h+4Y2xzT 5Xzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=eThpM9ux; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l15-20020a170903120f00b0016f66e22de2si6587545plh.462.2022.08.20.01.50.17; Sat, 20 Aug 2022 01:50:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=eThpM9ux; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344745AbiHTIpJ (ORCPT + 99 others); Sat, 20 Aug 2022 04:45:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344199AbiHTIpG (ORCPT ); Sat, 20 Aug 2022 04:45:06 -0400 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A40408B985 for ; Sat, 20 Aug 2022 01:45:05 -0700 (PDT) Received: by mail-ed1-x531.google.com with SMTP id r4so8102616edi.8 for ; Sat, 20 Aug 2022 01:45:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc; bh=C3neU1AtxmqWdDSuYqkB7lF7A3shUmwSCsbgD00NRVo=; b=eThpM9uxRwJzTuhVFBRMNJ9H0vTr2TRrapx/uMb8SXuMEM0TzA5O4w/AzUVnfw8+3n 7nQ5CmprNuO1C8uBjy+7pNZiEdrlbPmrWvBNxXoT1gE7ZCj8uNcIQLC0FgtjwkVcHjYH 6Jx9/6JQFwfLzdsSVWBmswc57cxIcKa9k/qF8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc; bh=C3neU1AtxmqWdDSuYqkB7lF7A3shUmwSCsbgD00NRVo=; b=kWFHQq4lIRgA+0ok99McSJqsmUD6JgweQ4qeLmWzEppnyKm3VXBXisLChQYXRqYMvQ zASTHnCfOJvAqz2iYnW1nhJ2R3SKdh2/aFD174y3nuHE4lysnjI6EIcB42jHB3V51crv UsBtfNjJ+uAJEA2uWJsm89145SmtLg6/f4yAEQQupc2FYPK76mX9gIyp3q4CYddqbDLm Z2AdYocDDYb92unbcuxvwtz0cCDb/t+BkrSu7qFts+eDPF5boW+cxhLL8az5t5NbWfK0 336WCbOEz83GtXkdyqjwidBsmXi/mBvz/XW2iUef+w54D05Aa8+cm0VsvKcZnRkcO9Mz u1MQ== X-Gm-Message-State: ACgBeo1/g8mWMGHs4IxgOIgWACjzSvZB91zRysiTtPt3vfbf94S9HPUV Z9p0f3pivyO1hx3veTegwL3h/pMAARcI9Q== X-Received: by 2002:aa7:dc13:0:b0:443:3f15:8440 with SMTP id b19-20020aa7dc13000000b004433f158440mr8563131edu.274.1660985103939; Sat, 20 Aug 2022 01:45:03 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-79-31-31-9.retail.telecomitalia.it. [79.31.31.9]) by smtp.gmail.com with ESMTPSA id k8-20020a17090632c800b0073cd7cc2c81sm2170821ejk.181.2022.08.20.01.45.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Aug 2022 01:45:03 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Michael Trimarchi , 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 v5 1/2] dmaengine: mxs: use platform_driver_register Date: Sat, 20 Aug 2022 10:44:59 +0200 Message-Id: <20220820084500.689445-1-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. - Add the patch "dmaengine: mxs: fix section mismatch" to remove the warning raised 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); -- 2.32.0