From: "Danilo Krummrich" <dakr@kernel.org>
To: "Alexander Stein" <alexander.stein@ew.tq-group.com>
Cc: "Gui-Dong Han" <hanguidong02@gmail.com>,
"Mark Brown" <broonie@kernel.org>, <gregkh@linuxfoundation.org>,
<rafael@kernel.org>, <linux-kernel@vger.kernel.org>,
<baijiaju1990@gmail.com>, "Qiu-ji Chen" <chenqiuji666@gmail.com>,
<Aishwarya.TCV@arm.com>
Subject: Re: [PATCH v5] driver core: enforce device_lock for driver_match_device()
Date: Wed, 11 Feb 2026 14:56:56 +0100 [thread overview]
Message-ID: <DGC6O1WZVGJB.155Z1XJ6BR727@kernel.org> (raw)
In-Reply-To: <13955113.uLZWGnKmhe@steina-w>
On Wed Feb 11, 2026 at 11:42 AM CET, Alexander Stein wrote:
> Am Dienstag, 20. Januar 2026, 14:22:19 CET schrieb Mark Brown:
>> On Wed, Jan 14, 2026 at 12:28:43AM +0800, Gui-Dong Han wrote:
> I've also experienced a boot problem on an NXP i.MX8QM based board
> (DT currently in process of upstreaming). Bisect also resulted in this
> commit.
Thanks for reporting (and the backtrace, that helps a lot).
This is another case where a platform driver registers another platform driver
in probe(). The following diff should fix the issue, I will send out a patch
soon.
diff --git a/drivers/clk/imx/clk-imx8qxp.c b/drivers/clk/imx/clk-imx8qxp.c
index 3ae162625bb1..d89a2f40771e 100644
--- a/drivers/clk/imx/clk-imx8qxp.c
+++ b/drivers/clk/imx/clk-imx8qxp.c
@@ -346,7 +346,29 @@ static struct platform_driver imx8qxp_clk_driver = {
},
.probe = imx8qxp_clk_probe,
};
-module_platform_driver(imx8qxp_clk_driver);
+
+static int __init imx8qxp_init(void)
+{
+ int ret;
+
+ ret = platform_driver_register(&imx8qxp_clk_driver);
+ if (ret)
+ return ret;
+
+ ret = imx_clk_scu_module_init();
+ if (ret)
+ platform_driver_unregister(&imx8qxp_clk_driver);
+
+ return ret;
+}
+module_init(imx8qxp_init);
+
+static void __exit imx8qxp_exit(void)
+{
+ imx_clk_scu_module_exit();
+ platform_driver_unregister(&imx8qxp_clk_driver);
+}
+module_exit(imx8qxp_exit);
MODULE_AUTHOR("Aisheng Dong <aisheng.dong@nxp.com>");
MODULE_DESCRIPTION("NXP i.MX8QXP clock driver");
diff --git a/drivers/clk/imx/clk-scu.c b/drivers/clk/imx/clk-scu.c
index 34c9dc1fb20e..c90d21e05f91 100644
--- a/drivers/clk/imx/clk-scu.c
+++ b/drivers/clk/imx/clk-scu.c
@@ -191,6 +191,16 @@ static bool imx_scu_clk_is_valid(u32 rsrc_id)
return p != NULL;
}
+int __init imx_clk_scu_module_init(void)
+{
+ return platform_driver_register(&imx_clk_scu_driver);
+}
+
+void __exit imx_clk_scu_module_exit(void)
+{
+ return platform_driver_unregister(&imx_clk_scu_driver);
+}
+
int imx_clk_scu_init(struct device_node *np,
const struct imx_clk_scu_rsrc_table *data)
{
@@ -215,7 +225,7 @@ int imx_clk_scu_init(struct device_node *np,
rsrc_table = data;
}
- return platform_driver_register(&imx_clk_scu_driver);
+ return 0;
}
/*
diff --git a/drivers/clk/imx/clk-scu.h b/drivers/clk/imx/clk-scu.h
index af7b697f51ca..ca82f2cce897 100644
--- a/drivers/clk/imx/clk-scu.h
+++ b/drivers/clk/imx/clk-scu.h
@@ -25,6 +25,8 @@ extern const struct imx_clk_scu_rsrc_table imx_clk_scu_rsrc_imx8dxl;
extern const struct imx_clk_scu_rsrc_table imx_clk_scu_rsrc_imx8qxp;
extern const struct imx_clk_scu_rsrc_table imx_clk_scu_rsrc_imx8qm;
+int __init imx_clk_scu_module_init(void);
+void __exit imx_clk_scu_module_exit(void);
int imx_clk_scu_init(struct device_node *np,
const struct imx_clk_scu_rsrc_table *data);
struct clk_hw *imx_scu_of_clk_src_get(struct of_phandle_args *clkspec,
next prev parent reply other threads:[~2026-02-11 13:56 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-13 16:28 [PATCH v5] driver core: enforce device_lock for driver_match_device() Gui-Dong Han
2026-01-13 16:35 ` Rafael J. Wysocki
2026-01-13 19:23 ` Danilo Krummrich
2026-01-16 7:34 ` Gui-Dong Han
2026-01-16 11:19 ` Greg KH
2026-01-16 11:38 ` Gui-Dong Han
2026-01-16 11:54 ` Danilo Krummrich
2026-01-20 13:22 ` Mark Brown
2026-01-20 13:30 ` Gui-Dong Han
2026-01-20 13:48 ` Mark Brown
2026-01-20 14:05 ` Gui-Dong Han
2026-01-21 8:55 ` Wang Jiayue
2026-01-21 8:57 ` Gui-Dong Han
2026-01-21 10:40 ` Danilo Krummrich
2026-01-21 11:02 ` Danilo Krummrich
2026-01-21 11:19 ` Greg KH
2026-01-21 12:49 ` Mark Brown
2026-01-21 12:50 ` Danilo Krummrich
2026-01-21 13:02 ` Will Deacon
2026-01-21 14:07 ` Danilo Krummrich
2026-01-21 13:03 ` Robin Murphy
2026-01-21 14:13 ` Danilo Krummrich
2026-01-21 13:22 ` Jiayue Wang
2026-01-20 15:03 ` Danilo Krummrich
2026-01-20 15:35 ` Mark Brown
2026-01-20 17:38 ` Mark Brown
2026-01-20 18:36 ` Danilo Krummrich
2026-01-20 20:05 ` Mark Brown
2026-01-20 21:18 ` Danilo Krummrich
2026-01-21 1:11 ` Danilo Krummrich
2026-01-21 7:18 ` Gui-Dong Han
2026-01-21 7:41 ` Gui-Dong Han
2026-01-21 7:56 ` Greg KH
2026-01-21 8:12 ` Greg KH
2026-01-21 9:54 ` Danilo Krummrich
2026-01-21 10:30 ` Greg KH
2026-01-20 15:23 ` Marek Szyprowski
2026-01-20 15:27 ` Mark Brown
2026-01-21 20:00 ` Jon Hunter
2026-01-21 21:42 ` Danilo Krummrich
2026-01-22 17:28 ` Jon Hunter
2026-01-22 17:55 ` Gui-Dong Han
2026-01-22 18:12 ` Danilo Krummrich
2026-01-22 18:58 ` Jon Hunter
2026-01-22 19:35 ` Danilo Krummrich
2026-01-23 13:57 ` Jon Hunter
2026-01-23 14:09 ` Danilo Krummrich
2026-01-23 14:29 ` Jon Hunter
2026-01-23 16:54 ` Danilo Krummrich
2026-01-23 18:53 ` Gui-Dong Han
2026-01-23 19:07 ` Danilo Krummrich
2026-01-27 14:58 ` Jon Hunter
2026-01-27 15:18 ` Danilo Krummrich
2026-01-27 14:53 ` Jon Hunter
2026-01-27 15:05 ` Gui-Dong Han
2026-01-21 7:40 ` David Heidelberg
2026-02-11 10:42 ` Alexander Stein
2026-02-11 13:56 ` Danilo Krummrich [this message]
2026-02-25 20:19 ` Cristian Marussi
2026-02-25 20:38 ` Danilo Krummrich
2026-02-26 8:54 ` Gatien CHEVALLIER
2026-02-26 11:15 ` Danilo Krummrich
2026-02-26 12:21 ` Cristian Marussi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DGC6O1WZVGJB.155Z1XJ6BR727@kernel.org \
--to=dakr@kernel.org \
--cc=Aishwarya.TCV@arm.com \
--cc=alexander.stein@ew.tq-group.com \
--cc=baijiaju1990@gmail.com \
--cc=broonie@kernel.org \
--cc=chenqiuji666@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=hanguidong02@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox