Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp272472imn; Wed, 27 Jul 2022 23:23:45 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v2+GAEEsRXRbynQR6sQpXvYHcZkkIZsHwUabc/AhDcJjkAsllQUw/bNZjCYzqYSODH0iPy X-Received: by 2002:a17:90b:4b4a:b0:1ef:fc95:3c4f with SMTP id mi10-20020a17090b4b4a00b001effc953c4fmr8442608pjb.138.1658989424897; Wed, 27 Jul 2022 23:23:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658989424; cv=none; d=google.com; s=arc-20160816; b=VyAL2fP9+PyNj6alCbJrNplPFSXsSTWOMDnC2HxqXDjp6aNLejUspHWkDU8FwSc+xD TupzgJYQzX2Db05d1m4wkc5GKKcnBaVbQlikCK+yW5Yn+0yBb4wDExDvgpk3rARDWJko uRktiiiYGacmI2dvnyWbJqQvx/rb3iMr/7XP65khR0RuMawvnBrBzVOmSQbnRhZPpUbn sG7/DYuRJA75AINCJUEsSXUzCjzYKmHWUios8hKYh7MmI6DVqGu0hIFca5VrFGx5rYob 0JeBMAiKtEt/J1wZwJvNIoljwS94GgUmh8BOpGJRohk5O91sikW027kmNRf1C6p3UXC2 F1eQ== 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=NvDoECp3c19PzhhsZAapgmnhFq+vfCYGpS0oBktcwMgBOMZT+vZzUQYAY+3scnFiVh OtCv7BX4xqt2h583uWMtmQ9kVsswgr8bFIw7Me7sUbtyQ/xMAR09BTAs2rcQBqsrOlye Sv0Lt3WPv6r1LUmXq0z/pxEA9scBqcxsrWipRAj5C5vCh/Nm77Ksq+mUgvH3+9pdVCIY 9a6XjM06qIfyx505ejNSR4Ho8/sgGgxdbW9GtiYEd+Hi3dcV6wcSMyINyzcfprfV13WZ bhvy2JChtsjVqdM8Cmejgj+ZVuLbe5fpMdtMS6KEx6IOynKFDfK99+abBavcIruNbj3y ZoDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=JbjP0JxI; 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 nd3-20020a17090b4cc300b001f2bda7da3esi1576863pjb.43.2022.07.27.23.23.28; Wed, 27 Jul 2022 23:23:44 -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=JbjP0JxI; 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 S234091AbiG1GTJ (ORCPT + 99 others); Thu, 28 Jul 2022 02:19:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233890AbiG1GTH (ORCPT ); Thu, 28 Jul 2022 02:19:07 -0400 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 725A05C96B for ; Wed, 27 Jul 2022 23:19:06 -0700 (PDT) Received: by mail-ej1-x636.google.com with SMTP id tk8so1403295ejc.7 for ; Wed, 27 Jul 2022 23:19:06 -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=C3neU1AtxmqWdDSuYqkB7lF7A3shUmwSCsbgD00NRVo=; b=JbjP0JxIPi4T11YXcnH4HfzVt3B9IfnonC2lFIPLzS/wmOUb7lhpdzdYvT4RKIgN1s +fllYg1aF6mDvF+BzTc6y2eUkbdIIT+mir7T0+tHeml2NqWAzQ7NwFEWVxbKafGJdQYr QfcK0ns+1kHqIN7wPBPR+/tZaFEMkZuqLNs6A= 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=C3neU1AtxmqWdDSuYqkB7lF7A3shUmwSCsbgD00NRVo=; b=NNfHwHCHFzJznGY1h/WMsmd/X2dPaiF4HA9YWTKiIF3weBTsDZvMFwY3MvgHYK75G6 IDB9rTRqpdYLygTKT5UX3uVY4Q19N7soHPnL2YunTCIIb21AV5ZOQ0nJKGbcUgp4xQVy emAwCoexeQXdeBEw2TwVoqtxX2iUF9vKRUPkFBPx0HiA3W+78BWKFC2WB7R0rq2IjzP2 TeIvgKaSJ0C78ws4H+6DPH2cu+ltttIo436dBXzSGF8uZtRLxYQxzZERkrghhIgKW0Ns 5R2BTfqLgxhfkzapQewL4+9A27sKpnJG3SzhO9AEDILwMGKXvyyJNHu1ZKwRpXLqKele ivMA== X-Gm-Message-State: AJIora+eGAhnqNkM81LV/rKfjHJNKKRL7Nexkl0p85yGAT2yHhhs+A8q sB9UMaOq1pL3krmU7y/8v0f39jzZ+cCk+A== X-Received: by 2002:a17:907:6818:b0:72b:5bac:c3a3 with SMTP id qz24-20020a170907681800b0072b5bacc3a3mr19390245ejc.139.1658989144713; Wed, 27 Jul 2022 23:19:04 -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 d6-20020aa7ce06000000b0043ba24a26casm105469edv.23.2022.07.27.23.19.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Jul 2022 23:19:04 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Michael Trimarchi , linux-amarula@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 v5 1/2] dmaengine: mxs: use platform_driver_register Date: Thu, 28 Jul 2022 08:18:51 +0200 Message-Id: <20220728061852.209938-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 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