* [PATCH v4] dmaengine: mxs: fix driver registering
@ 2022-06-21 12:36 ` Dario Binacchi
0 siblings, 0 replies; 4+ messages in thread
From: Dario Binacchi @ 2022-06-21 12:36 UTC (permalink / raw)
To: linux-kernel
Cc: linux-amarula, Dario Binacchi, Michael Trimarchi, stable,
Fabio Estevam, NXP Linux Team, Pengutronix Kernel Team,
Sascha Hauer, Shawn Guo, Vinod Koul, dmaengine, linux-arm-kernel
Driver registration fails on SOC imx8mn as its supplier, the clock
control module, is not ready. Since platform_driver_probe(), as
reported by its description, is incompatible with deferred probing,
we have to use platform_driver_register().
The addition of the `_probe' suffix to the `mxs_dma_driver' variable was
suggested by the following modpost warning:
WARNING: modpost: vmlinux.o(.data+0xa3900): Section mismatch in reference from the variable mxs_dma_driver to the function .init.text:mxs_dma_probe()
The variable mxs_dma_driver references
the function __init mxs_dma_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
Fixes: a580b8c5429a ("dmaengine: mxs-dma: add dma support for i.MX23/28")
Co-developed-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Cc: stable@vger.kernel.org
---
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 | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers/dma/mxs-dma.c b/drivers/dma/mxs-dma.c
index 994fc4d2aca4..4c878bf1e092 100644
--- a/drivers/dma/mxs-dma.c
+++ b/drivers/dma/mxs-dma.c
@@ -834,15 +834,11 @@ static int __init mxs_dma_probe(struct platform_device *pdev)
return 0;
}
-static struct platform_driver mxs_dma_driver = {
+static struct platform_driver mxs_dma_driver_probe = {
.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_probe);
--
2.32.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v4] dmaengine: mxs: fix driver registering
@ 2022-06-21 12:36 ` Dario Binacchi
0 siblings, 0 replies; 4+ messages in thread
From: Dario Binacchi @ 2022-06-21 12:36 UTC (permalink / raw)
To: linux-kernel
Cc: linux-amarula, Dario Binacchi, Michael Trimarchi, stable,
Fabio Estevam, NXP Linux Team, Pengutronix Kernel Team,
Sascha Hauer, Shawn Guo, Vinod Koul, dmaengine, linux-arm-kernel
Driver registration fails on SOC imx8mn as its supplier, the clock
control module, is not ready. Since platform_driver_probe(), as
reported by its description, is incompatible with deferred probing,
we have to use platform_driver_register().
The addition of the `_probe' suffix to the `mxs_dma_driver' variable was
suggested by the following modpost warning:
WARNING: modpost: vmlinux.o(.data+0xa3900): Section mismatch in reference from the variable mxs_dma_driver to the function .init.text:mxs_dma_probe()
The variable mxs_dma_driver references
the function __init mxs_dma_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
Fixes: a580b8c5429a ("dmaengine: mxs-dma: add dma support for i.MX23/28")
Co-developed-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Cc: stable@vger.kernel.org
---
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 | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers/dma/mxs-dma.c b/drivers/dma/mxs-dma.c
index 994fc4d2aca4..4c878bf1e092 100644
--- a/drivers/dma/mxs-dma.c
+++ b/drivers/dma/mxs-dma.c
@@ -834,15 +834,11 @@ static int __init mxs_dma_probe(struct platform_device *pdev)
return 0;
}
-static struct platform_driver mxs_dma_driver = {
+static struct platform_driver mxs_dma_driver_probe = {
.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_probe);
--
2.32.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v4] dmaengine: mxs: fix driver registering
2022-06-21 12:36 ` Dario Binacchi
@ 2022-07-06 5:58 ` Vinod Koul
-1 siblings, 0 replies; 4+ messages in thread
From: Vinod Koul @ 2022-07-06 5:58 UTC (permalink / raw)
To: Dario Binacchi
Cc: linux-kernel, linux-amarula, Michael Trimarchi, stable,
Fabio Estevam, NXP Linux Team, Pengutronix Kernel Team,
Sascha Hauer, Shawn Guo, dmaengine, linux-arm-kernel
On 21-06-22, 14:36, Dario Binacchi wrote:
> Driver registration fails on SOC imx8mn as its supplier, the clock
> control module, is not ready. Since platform_driver_probe(), as
> reported by its description, is incompatible with deferred probing,
> we have to use platform_driver_register().
Pls revise title to reflect the changes added and not the effect
Btw lots of driver work like this, they use platform_driver_probe() but
make the clk and other resources do earlier init levels. This change is
fine too...
> The addition of the `_probe' suffix to the `mxs_dma_driver' variable was
> suggested by the following modpost warning:
>
> WARNING: modpost: vmlinux.o(.data+0xa3900): Section mismatch in reference from the variable mxs_dma_driver to the function .init.text:mxs_dma_probe()
> The variable mxs_dma_driver references
> the function __init mxs_dma_probe()
> If the reference is valid then annotate the
> variable with __init* or __refdata (see linux/init.h) or name the variable:
> *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
that should be always a separate patch
>
> Fixes: a580b8c5429a ("dmaengine: mxs-dma: add dma support for i.MX23/28")
> Co-developed-by: Michael Trimarchi <michael@amarulasolutions.com>
> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
> Cc: stable@vger.kernel.org
>
> ---
>
> 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 | 10 +++-------
> 1 file changed, 3 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/dma/mxs-dma.c b/drivers/dma/mxs-dma.c
> index 994fc4d2aca4..4c878bf1e092 100644
> --- a/drivers/dma/mxs-dma.c
> +++ b/drivers/dma/mxs-dma.c
> @@ -834,15 +834,11 @@ static int __init mxs_dma_probe(struct platform_device *pdev)
> return 0;
> }
>
> -static struct platform_driver mxs_dma_driver = {
> +static struct platform_driver mxs_dma_driver_probe = {
> .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_probe);
> --
> 2.32.0
--
~Vinod
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v4] dmaengine: mxs: fix driver registering
@ 2022-07-06 5:58 ` Vinod Koul
0 siblings, 0 replies; 4+ messages in thread
From: Vinod Koul @ 2022-07-06 5:58 UTC (permalink / raw)
To: Dario Binacchi
Cc: linux-kernel, linux-amarula, Michael Trimarchi, stable,
Fabio Estevam, NXP Linux Team, Pengutronix Kernel Team,
Sascha Hauer, Shawn Guo, dmaengine, linux-arm-kernel
On 21-06-22, 14:36, Dario Binacchi wrote:
> Driver registration fails on SOC imx8mn as its supplier, the clock
> control module, is not ready. Since platform_driver_probe(), as
> reported by its description, is incompatible with deferred probing,
> we have to use platform_driver_register().
Pls revise title to reflect the changes added and not the effect
Btw lots of driver work like this, they use platform_driver_probe() but
make the clk and other resources do earlier init levels. This change is
fine too...
> The addition of the `_probe' suffix to the `mxs_dma_driver' variable was
> suggested by the following modpost warning:
>
> WARNING: modpost: vmlinux.o(.data+0xa3900): Section mismatch in reference from the variable mxs_dma_driver to the function .init.text:mxs_dma_probe()
> The variable mxs_dma_driver references
> the function __init mxs_dma_probe()
> If the reference is valid then annotate the
> variable with __init* or __refdata (see linux/init.h) or name the variable:
> *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
that should be always a separate patch
>
> Fixes: a580b8c5429a ("dmaengine: mxs-dma: add dma support for i.MX23/28")
> Co-developed-by: Michael Trimarchi <michael@amarulasolutions.com>
> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
> Cc: stable@vger.kernel.org
>
> ---
>
> 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 | 10 +++-------
> 1 file changed, 3 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/dma/mxs-dma.c b/drivers/dma/mxs-dma.c
> index 994fc4d2aca4..4c878bf1e092 100644
> --- a/drivers/dma/mxs-dma.c
> +++ b/drivers/dma/mxs-dma.c
> @@ -834,15 +834,11 @@ static int __init mxs_dma_probe(struct platform_device *pdev)
> return 0;
> }
>
> -static struct platform_driver mxs_dma_driver = {
> +static struct platform_driver mxs_dma_driver_probe = {
> .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_probe);
> --
> 2.32.0
--
~Vinod
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-07-06 5:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-21 12:36 [PATCH v4] dmaengine: mxs: fix driver registering Dario Binacchi
2022-06-21 12:36 ` Dario Binacchi
2022-07-06 5:58 ` Vinod Koul
2022-07-06 5:58 ` Vinod Koul
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.