* [PATCH] ARM: imx: src: Use postcore_platform_driver() macro
@ 2022-06-28 6:19 Alexander Shiyan
2022-06-28 6:19 ` [PATCH] drivers: firmware: arm-scmi: Use core_platform_driver() macro Alexander Shiyan
2022-06-29 7:12 ` [PATCH] ARM: imx: src: Use postcore_platform_driver() macro Sascha Hauer
0 siblings, 2 replies; 7+ messages in thread
From: Alexander Shiyan @ 2022-06-28 6:19 UTC (permalink / raw)
To: barebox; +Cc: Alexander Shiyan
Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com>
---
arch/arm/mach-imx/src.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/arch/arm/mach-imx/src.c b/arch/arm/mach-imx/src.c
index 8272d5b720..8366397e10 100644
--- a/arch/arm/mach-imx/src.c
+++ b/arch/arm/mach-imx/src.c
@@ -43,9 +43,4 @@ static struct driver_d imx_src_reset_driver = {
.probe = imx_src_reset_probe,
.of_compatible = DRV_OF_COMPAT(imx_src_dt_ids),
};
-
-static int imx_src_reset_init(void)
-{
- return platform_driver_register(&imx_src_reset_driver);
-}
-postcore_initcall(imx_src_reset_init);
+postcore_platform_driver(imx_src_reset_driver);
--
2.32.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] drivers: firmware: arm-scmi: Use core_platform_driver() macro
2022-06-28 6:19 [PATCH] ARM: imx: src: Use postcore_platform_driver() macro Alexander Shiyan
@ 2022-06-28 6:19 ` Alexander Shiyan
2022-06-28 8:25 ` Ahmad Fatoum
2022-06-30 18:58 ` Sascha Hauer
2022-06-29 7:12 ` [PATCH] ARM: imx: src: Use postcore_platform_driver() macro Sascha Hauer
1 sibling, 2 replies; 7+ messages in thread
From: Alexander Shiyan @ 2022-06-28 6:19 UTC (permalink / raw)
To: barebox; +Cc: Alexander Shiyan
Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com>
---
drivers/firmware/arm_scmi/driver.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c
index ef3d76b3f4..ad91a60e0c 100644
--- a/drivers/firmware/arm_scmi/driver.c
+++ b/drivers/firmware/arm_scmi/driver.c
@@ -1252,6 +1252,7 @@ static struct driver_d scmi_driver = {
.of_compatible = scmi_of_match,
.probe = scmi_probe,
};
+core_platform_driver(scmi_driver);
static int __init scmi_bus_driver_init(void)
{
@@ -1267,12 +1268,6 @@ static int __init scmi_bus_driver_init(void)
}
pure_initcall(scmi_bus_driver_init);
-static int __init scmi_platform_driver_init(void)
-{
- return platform_driver_register(&scmi_driver);
-}
-core_initcall(scmi_platform_driver_init);
-
MODULE_ALIAS("platform: arm-scmi");
MODULE_AUTHOR("Sudeep Holla <sudeep.holla@arm.com>");
MODULE_DESCRIPTION("ARM SCMI protocol driver");
--
2.32.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drivers: firmware: arm-scmi: Use core_platform_driver() macro
2022-06-28 6:19 ` [PATCH] drivers: firmware: arm-scmi: Use core_platform_driver() macro Alexander Shiyan
@ 2022-06-28 8:25 ` Ahmad Fatoum
2022-06-30 18:58 ` Sascha Hauer
1 sibling, 0 replies; 7+ messages in thread
From: Ahmad Fatoum @ 2022-06-28 8:25 UTC (permalink / raw)
To: Alexander Shiyan, barebox
On 28.06.22 08:19, Alexander Shiyan wrote:
> Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com>
Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> drivers/firmware/arm_scmi/driver.c | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c
> index ef3d76b3f4..ad91a60e0c 100644
> --- a/drivers/firmware/arm_scmi/driver.c
> +++ b/drivers/firmware/arm_scmi/driver.c
> @@ -1252,6 +1252,7 @@ static struct driver_d scmi_driver = {
> .of_compatible = scmi_of_match,
> .probe = scmi_probe,
> };
> +core_platform_driver(scmi_driver);
>
> static int __init scmi_bus_driver_init(void)
> {
> @@ -1267,12 +1268,6 @@ static int __init scmi_bus_driver_init(void)
> }
> pure_initcall(scmi_bus_driver_init);
>
> -static int __init scmi_platform_driver_init(void)
> -{
> - return platform_driver_register(&scmi_driver);
> -}
> -core_initcall(scmi_platform_driver_init);
> -
> MODULE_ALIAS("platform: arm-scmi");
> MODULE_AUTHOR("Sudeep Holla <sudeep.holla@arm.com>");
> MODULE_DESCRIPTION("ARM SCMI protocol driver");
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] ARM: imx: src: Use postcore_platform_driver() macro
2022-06-28 6:19 [PATCH] ARM: imx: src: Use postcore_platform_driver() macro Alexander Shiyan
2022-06-28 6:19 ` [PATCH] drivers: firmware: arm-scmi: Use core_platform_driver() macro Alexander Shiyan
@ 2022-06-29 7:12 ` Sascha Hauer
1 sibling, 0 replies; 7+ messages in thread
From: Sascha Hauer @ 2022-06-29 7:12 UTC (permalink / raw)
To: Alexander Shiyan; +Cc: barebox
On Tue, Jun 28, 2022 at 09:19:39AM +0300, Alexander Shiyan wrote:
> Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com>
> ---
> arch/arm/mach-imx/src.c | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
Applied, thanks
Sascha
>
> diff --git a/arch/arm/mach-imx/src.c b/arch/arm/mach-imx/src.c
> index 8272d5b720..8366397e10 100644
> --- a/arch/arm/mach-imx/src.c
> +++ b/arch/arm/mach-imx/src.c
> @@ -43,9 +43,4 @@ static struct driver_d imx_src_reset_driver = {
> .probe = imx_src_reset_probe,
> .of_compatible = DRV_OF_COMPAT(imx_src_dt_ids),
> };
> -
> -static int imx_src_reset_init(void)
> -{
> - return platform_driver_register(&imx_src_reset_driver);
> -}
> -postcore_initcall(imx_src_reset_init);
> +postcore_platform_driver(imx_src_reset_driver);
> --
> 2.32.0
>
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drivers: firmware: arm-scmi: Use core_platform_driver() macro
2022-06-28 6:19 ` [PATCH] drivers: firmware: arm-scmi: Use core_platform_driver() macro Alexander Shiyan
2022-06-28 8:25 ` Ahmad Fatoum
@ 2022-06-30 18:58 ` Sascha Hauer
2022-06-30 19:04 ` Alexander Shiyan
1 sibling, 1 reply; 7+ messages in thread
From: Sascha Hauer @ 2022-06-30 18:58 UTC (permalink / raw)
To: Alexander Shiyan; +Cc: barebox
On Tue, Jun 28, 2022 at 09:19:40AM +0300, Alexander Shiyan wrote:
> Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com>
> ---
> drivers/firmware/arm_scmi/driver.c | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c
> index ef3d76b3f4..ad91a60e0c 100644
> --- a/drivers/firmware/arm_scmi/driver.c
> +++ b/drivers/firmware/arm_scmi/driver.c
> @@ -1252,6 +1252,7 @@ static struct driver_d scmi_driver = {
> .of_compatible = scmi_of_match,
> .probe = scmi_probe,
> };
> +core_platform_driver(scmi_driver);
Had to drop this one as well. The core_platform_driver macro expands
to an initcall named drv##_register which becomes scmi_driver_register,
but that function already exists in include/linux/scmi_protocol.h.
Sascha
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drivers: firmware: arm-scmi: Use core_platform_driver() macro
2022-06-30 18:58 ` Sascha Hauer
@ 2022-06-30 19:04 ` Alexander Shiyan
2022-07-01 6:47 ` Sascha Hauer
0 siblings, 1 reply; 7+ messages in thread
From: Alexander Shiyan @ 2022-06-30 19:04 UTC (permalink / raw)
To: Sascha Hauer; +Cc: Barebox List
Can this struct be renamed to arm_scmi_driver?
чт, 30 июн. 2022 г. в 21:58, Sascha Hauer <sha@pengutronix.de>:
>
> On Tue, Jun 28, 2022 at 09:19:40AM +0300, Alexander Shiyan wrote:
> > Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com>
> > ---
> > drivers/firmware/arm_scmi/driver.c | 7 +------
> > 1 file changed, 1 insertion(+), 6 deletions(-)
> >
> > diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c
> > index ef3d76b3f4..ad91a60e0c 100644
> > --- a/drivers/firmware/arm_scmi/driver.c
> > +++ b/drivers/firmware/arm_scmi/driver.c
> > @@ -1252,6 +1252,7 @@ static struct driver_d scmi_driver = {
> > .of_compatible = scmi_of_match,
> > .probe = scmi_probe,
> > };
> > +core_platform_driver(scmi_driver);
>
> Had to drop this one as well. The core_platform_driver macro expands
> to an initcall named drv##_register which becomes scmi_driver_register,
> but that function already exists in include/linux/scmi_protocol.h.
>
> Sascha
>
> --
> Pengutronix e.K. | |
> Steuerwalder Str. 21 | http://www.pengutronix.de/ |
> 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drivers: firmware: arm-scmi: Use core_platform_driver() macro
2022-06-30 19:04 ` Alexander Shiyan
@ 2022-07-01 6:47 ` Sascha Hauer
0 siblings, 0 replies; 7+ messages in thread
From: Sascha Hauer @ 2022-07-01 6:47 UTC (permalink / raw)
To: Alexander Shiyan; +Cc: Barebox List
On Thu, Jun 30, 2022 at 10:04:44PM +0300, Alexander Shiyan wrote:
> Can this struct be renamed to arm_scmi_driver?
>
> чт, 30 июн. 2022 г. в 21:58, Sascha Hauer <sha@pengutronix.de>:
> >
> > On Tue, Jun 28, 2022 at 09:19:40AM +0300, Alexander Shiyan wrote:
> > > Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com>
> > > ---
> > > drivers/firmware/arm_scmi/driver.c | 7 +------
> > > 1 file changed, 1 insertion(+), 6 deletions(-)
> > >
> > > diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c
> > > index ef3d76b3f4..ad91a60e0c 100644
> > > --- a/drivers/firmware/arm_scmi/driver.c
> > > +++ b/drivers/firmware/arm_scmi/driver.c
> > > @@ -1252,6 +1252,7 @@ static struct driver_d scmi_driver = {
> > > .of_compatible = scmi_of_match,
> > > .probe = scmi_probe,
> > > };
> > > +core_platform_driver(scmi_driver);
> >
> > Had to drop this one as well. The core_platform_driver macro expands
> > to an initcall named drv##_register which becomes scmi_driver_register,
> > but that function already exists in include/linux/scmi_protocol.h.
Did that. I considered adding some underscores to the function names in
register_driver_macro, but that would show up in the trace initcalls
functionality which doesn't make that output nicer.
Sascha
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-07-01 6:49 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-28 6:19 [PATCH] ARM: imx: src: Use postcore_platform_driver() macro Alexander Shiyan
2022-06-28 6:19 ` [PATCH] drivers: firmware: arm-scmi: Use core_platform_driver() macro Alexander Shiyan
2022-06-28 8:25 ` Ahmad Fatoum
2022-06-30 18:58 ` Sascha Hauer
2022-06-30 19:04 ` Alexander Shiyan
2022-07-01 6:47 ` Sascha Hauer
2022-06-29 7:12 ` [PATCH] ARM: imx: src: Use postcore_platform_driver() macro Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox