From: Peng Fan <peng.fan@nxp.com>
To: Leonard Crestez <leonard.crestez@nxp.com>,
Stephen Boyd <sboyd@kernel.org>, Shawn Guo <shawnguo@kernel.org>
Cc: Michael Turquette <mturquette@baylibre.com>,
Jacky Bai <ping.bai@nxp.com>, Anson Huang <anson.huang@nxp.com>,
Abel Vesa <abel.vesa@nxp.com>,
Aisheng Dong <aisheng.dong@nxp.com>,
Fabio Estevam <fabio.estevam@nxp.com>,
"linux-clk@vger.kernel.org" <linux-clk@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
dl-linux-imx <linux-imx@nxp.com>,
"kernel@pengutronix.de" <kernel@pengutronix.de>
Subject: RE: [PATCH] clk: imx8m: Suppress bind attrs
Date: Tue, 19 Nov 2019 09:11:01 +0000 [thread overview]
Message-ID: <AM0PR04MB448144625FD1BE6177E35B55884C0@AM0PR04MB4481.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <9f2ac65bab203a943de947465d6534980585e144.1574116045.git.leonard.crestez@nxp.com>
> Subject: [PATCH] clk: imx8m: Suppress bind attrs
>
> The clock drivers on imx8m series are registered as platform devices and this
> opens the possibility of reloading the driver at runtime:
>
> This doesn't actually work: clocks are never removed and attempting to bind
> again results in registration errors and a crash.
>
> Fix this by explicitly suppressing bind attrs like several other drivers.
>
> Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
>
> ---
> No cc: stable because because there are likely many other opportunities to
> crash the system by echoing random stuff in sysfs as root.
>
> drivers/clk/imx/clk-imx8mm.c | 1 +
> drivers/clk/imx/clk-imx8mn.c | 1 +
> drivers/clk/imx/clk-imx8mq.c | 1 +
> 3 files changed, 3 insertions(+)
>
> diff --git a/drivers/clk/imx/clk-imx8mm.c b/drivers/clk/imx/clk-imx8mm.c
> index 9246e89bb5fd..3cb75ad4270d 100644
> --- a/drivers/clk/imx/clk-imx8mm.c
> +++ b/drivers/clk/imx/clk-imx8mm.c
> @@ -619,9 +619,10 @@ MODULE_DEVICE_TABLE(of,
> imx8mm_clk_of_match);
>
> static struct platform_driver imx8mm_clk_driver = {
> .probe = imx8mm_clocks_probe,
> .driver = {
> .name = "imx8mm-ccm",
> + .suppress_bind_attrs = true,
> .of_match_table = of_match_ptr(imx8mm_clk_of_match),
> },
> };
> module_platform_driver(imx8mm_clk_driver);
> diff --git a/drivers/clk/imx/clk-imx8mn.c b/drivers/clk/imx/clk-imx8mn.c
> index 4749beab9fc8..d16530430ac2 100644
> --- a/drivers/clk/imx/clk-imx8mn.c
> +++ b/drivers/clk/imx/clk-imx8mn.c
> @@ -576,9 +576,10 @@ MODULE_DEVICE_TABLE(of,
> imx8mn_clk_of_match);
>
> static struct platform_driver imx8mn_clk_driver = {
> .probe = imx8mn_clocks_probe,
> .driver = {
> .name = "imx8mn-ccm",
> + .suppress_bind_attrs = true,
> .of_match_table = of_match_ptr(imx8mn_clk_of_match),
> },
> };
> module_platform_driver(imx8mn_clk_driver);
> diff --git a/drivers/clk/imx/clk-imx8mq.c b/drivers/clk/imx/clk-imx8mq.c
> index c8ab86fcba7c..0e0f69e881bd 100644
> --- a/drivers/clk/imx/clk-imx8mq.c
> +++ b/drivers/clk/imx/clk-imx8mq.c
> @@ -611,9 +611,10 @@ MODULE_DEVICE_TABLE(of,
> imx8mq_clk_of_match);
>
> static struct platform_driver imx8mq_clk_driver = {
> .probe = imx8mq_clocks_probe,
> .driver = {
> .name = "imx8mq-ccm",
> + .suppress_bind_attrs = true,
> .of_match_table = of_match_ptr(imx8mq_clk_of_match),
> },
> };
> module_platform_driver(imx8mq_clk_driver);
> --
> 2.17.1
next prev parent reply other threads:[~2019-11-19 9:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-18 22:28 [PATCH] clk: imx8m: Suppress bind attrs Leonard Crestez
2019-11-19 7:09 ` Uwe Kleine-König
2019-11-19 14:23 ` Leonard Crestez
2019-11-19 15:06 ` Uwe Kleine-König
2019-11-19 9:11 ` Peng Fan [this message]
2019-11-21 13:52 Leonard Crestez
2019-12-09 2:36 ` Shawn Guo
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=AM0PR04MB448144625FD1BE6177E35B55884C0@AM0PR04MB4481.eurprd04.prod.outlook.com \
--to=peng.fan@nxp.com \
--cc=abel.vesa@nxp.com \
--cc=aisheng.dong@nxp.com \
--cc=anson.huang@nxp.com \
--cc=fabio.estevam@nxp.com \
--cc=kernel@pengutronix.de \
--cc=leonard.crestez@nxp.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-imx@nxp.com \
--cc=mturquette@baylibre.com \
--cc=ping.bai@nxp.com \
--cc=sboyd@kernel.org \
--cc=shawnguo@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;
as well as URLs for NNTP newsgroup(s).