* [PATCH] ARM: ep93xx: Avoid soc_device_to_device()
@ 2019-11-11 22:37 ` Andreas Färber
0 siblings, 0 replies; 6+ messages in thread
From: Andreas Färber @ 2019-11-11 22:37 UTC (permalink / raw)
To: Hartley Sweeten, Alexander Sverdlin
Cc: linux-arm-kernel, linux-kernel, Andreas Färber,
Greg Kroah-Hartman, Russell King
ep93xx_init_soc() uses soc_device_to_device() to return a device
to ep93xx_init_devices(), where it is passed on to its callers,
who all ignore the return value. As this helper is deprecated,
change the return type of ep93xx_init_devices() to void and
have ep93xx_init_soc() return the soc_device instead.
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
arch/arm/mach-ep93xx/core.c | 12 ++++--------
arch/arm/mach-ep93xx/platform.h | 2 +-
2 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
index 6fb19a393fd2..7a0c82b30564 100644
--- a/arch/arm/mach-ep93xx/core.c
+++ b/arch/arm/mach-ep93xx/core.c
@@ -937,7 +937,7 @@ static const char __init *ep93xx_get_machine_name(void)
return kasprintf(GFP_KERNEL,"%s", machine_desc->name);
}
-static struct device __init *ep93xx_init_soc(void)
+static struct soc_device __init *ep93xx_init_soc(void)
{
struct soc_device_attribute *soc_dev_attr;
struct soc_device *soc_dev;
@@ -958,13 +958,11 @@ static struct device __init *ep93xx_init_soc(void)
return NULL;
}
- return soc_device_to_device(soc_dev);
+ return soc_dev;
}
-struct device __init *ep93xx_init_devices(void)
+void __init ep93xx_init_devices(void)
{
- struct device *parent;
-
/* Disallow access to MaverickCrunch initially */
ep93xx_devcfg_clear_bits(EP93XX_SYSCON_DEVCFG_CPENA);
@@ -975,7 +973,7 @@ struct device __init *ep93xx_init_devices(void)
EP93XX_SYSCON_DEVCFG_GONIDE |
EP93XX_SYSCON_DEVCFG_HONIDE);
- parent = ep93xx_init_soc();
+ ep93xx_init_soc();
/* Get the GPIO working early, other devices need it */
platform_device_register(&ep93xx_gpio_device);
@@ -989,8 +987,6 @@ struct device __init *ep93xx_init_devices(void)
platform_device_register(&ep93xx_wdt_device);
gpio_led_register_device(-1, &ep93xx_led_data);
-
- return parent;
}
void ep93xx_restart(enum reboot_mode mode, const char *cmd)
diff --git a/arch/arm/mach-ep93xx/platform.h b/arch/arm/mach-ep93xx/platform.h
index b4045a186239..8a3a2be50f11 100644
--- a/arch/arm/mach-ep93xx/platform.h
+++ b/arch/arm/mach-ep93xx/platform.h
@@ -34,7 +34,7 @@ void ep93xx_register_ac97(void);
void ep93xx_register_ide(void);
void ep93xx_register_adc(void);
-struct device *ep93xx_init_devices(void);
+void ep93xx_init_devices(void);
extern void ep93xx_timer_init(void);
void ep93xx_restart(enum reboot_mode, const char *);
--
2.16.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] ARM: ep93xx: Avoid soc_device_to_device()
@ 2019-11-11 22:37 ` Andreas Färber
0 siblings, 0 replies; 6+ messages in thread
From: Andreas Färber @ 2019-11-11 22:37 UTC (permalink / raw)
To: Hartley Sweeten, Alexander Sverdlin
Cc: Russell King, Greg Kroah-Hartman, linux-kernel, linux-arm-kernel,
Andreas Färber
ep93xx_init_soc() uses soc_device_to_device() to return a device
to ep93xx_init_devices(), where it is passed on to its callers,
who all ignore the return value. As this helper is deprecated,
change the return type of ep93xx_init_devices() to void and
have ep93xx_init_soc() return the soc_device instead.
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
arch/arm/mach-ep93xx/core.c | 12 ++++--------
arch/arm/mach-ep93xx/platform.h | 2 +-
2 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
index 6fb19a393fd2..7a0c82b30564 100644
--- a/arch/arm/mach-ep93xx/core.c
+++ b/arch/arm/mach-ep93xx/core.c
@@ -937,7 +937,7 @@ static const char __init *ep93xx_get_machine_name(void)
return kasprintf(GFP_KERNEL,"%s", machine_desc->name);
}
-static struct device __init *ep93xx_init_soc(void)
+static struct soc_device __init *ep93xx_init_soc(void)
{
struct soc_device_attribute *soc_dev_attr;
struct soc_device *soc_dev;
@@ -958,13 +958,11 @@ static struct device __init *ep93xx_init_soc(void)
return NULL;
}
- return soc_device_to_device(soc_dev);
+ return soc_dev;
}
-struct device __init *ep93xx_init_devices(void)
+void __init ep93xx_init_devices(void)
{
- struct device *parent;
-
/* Disallow access to MaverickCrunch initially */
ep93xx_devcfg_clear_bits(EP93XX_SYSCON_DEVCFG_CPENA);
@@ -975,7 +973,7 @@ struct device __init *ep93xx_init_devices(void)
EP93XX_SYSCON_DEVCFG_GONIDE |
EP93XX_SYSCON_DEVCFG_HONIDE);
- parent = ep93xx_init_soc();
+ ep93xx_init_soc();
/* Get the GPIO working early, other devices need it */
platform_device_register(&ep93xx_gpio_device);
@@ -989,8 +987,6 @@ struct device __init *ep93xx_init_devices(void)
platform_device_register(&ep93xx_wdt_device);
gpio_led_register_device(-1, &ep93xx_led_data);
-
- return parent;
}
void ep93xx_restart(enum reboot_mode mode, const char *cmd)
diff --git a/arch/arm/mach-ep93xx/platform.h b/arch/arm/mach-ep93xx/platform.h
index b4045a186239..8a3a2be50f11 100644
--- a/arch/arm/mach-ep93xx/platform.h
+++ b/arch/arm/mach-ep93xx/platform.h
@@ -34,7 +34,7 @@ void ep93xx_register_ac97(void);
void ep93xx_register_ide(void);
void ep93xx_register_adc(void);
-struct device *ep93xx_init_devices(void);
+void ep93xx_init_devices(void);
extern void ep93xx_timer_init(void);
void ep93xx_restart(enum reboot_mode, const char *);
--
2.16.4
_______________________________________________
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] 6+ messages in thread
* Re: [PATCH] ARM: ep93xx: Avoid soc_device_to_device()
2019-11-11 22:37 ` Andreas Färber
@ 2019-11-11 23:17 ` Alexander Sverdlin
-1 siblings, 0 replies; 6+ messages in thread
From: Alexander Sverdlin @ 2019-11-11 23:17 UTC (permalink / raw)
To: Andreas Färber, Hartley Sweeten
Cc: linux-arm-kernel, linux-kernel, Greg Kroah-Hartman, Russell King
Hi!
On 11/11/2019 23:37, Andreas Färber wrote:
> ep93xx_init_soc() uses soc_device_to_device() to return a device
> to ep93xx_init_devices(), where it is passed on to its callers,
> who all ignore the return value. As this helper is deprecated,
> change the return type of ep93xx_init_devices() to void and
> have ep93xx_init_soc() return the soc_device instead.
>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
> ---
> arch/arm/mach-ep93xx/core.c | 12 ++++--------
> arch/arm/mach-ep93xx/platform.h | 2 +-
> 2 files changed, 5 insertions(+), 9 deletions(-)
>
> diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
> index 6fb19a393fd2..7a0c82b30564 100644
> --- a/arch/arm/mach-ep93xx/core.c
> +++ b/arch/arm/mach-ep93xx/core.c
> @@ -937,7 +937,7 @@ static const char __init *ep93xx_get_machine_name(void)
> return kasprintf(GFP_KERNEL,"%s", machine_desc->name);
> }
>
> -static struct device __init *ep93xx_init_soc(void)
> +static struct soc_device __init *ep93xx_init_soc(void)
> {
> struct soc_device_attribute *soc_dev_attr;
> struct soc_device *soc_dev;
> @@ -958,13 +958,11 @@ static struct device __init *ep93xx_init_soc(void)
> return NULL;
> }
>
> - return soc_device_to_device(soc_dev);
> + return soc_dev;
> }
>
> -struct device __init *ep93xx_init_devices(void)
> +void __init ep93xx_init_devices(void)
> {
> - struct device *parent;
> -
> /* Disallow access to MaverickCrunch initially */
> ep93xx_devcfg_clear_bits(EP93XX_SYSCON_DEVCFG_CPENA);
>
> @@ -975,7 +973,7 @@ struct device __init *ep93xx_init_devices(void)
> EP93XX_SYSCON_DEVCFG_GONIDE |
> EP93XX_SYSCON_DEVCFG_HONIDE);
>
> - parent = ep93xx_init_soc();
> + ep93xx_init_soc();
>
> /* Get the GPIO working early, other devices need it */
> platform_device_register(&ep93xx_gpio_device);
> @@ -989,8 +987,6 @@ struct device __init *ep93xx_init_devices(void)
> platform_device_register(&ep93xx_wdt_device);
>
> gpio_led_register_device(-1, &ep93xx_led_data);
> -
> - return parent;
> }
>
> void ep93xx_restart(enum reboot_mode mode, const char *cmd)
> diff --git a/arch/arm/mach-ep93xx/platform.h b/arch/arm/mach-ep93xx/platform.h
> index b4045a186239..8a3a2be50f11 100644
> --- a/arch/arm/mach-ep93xx/platform.h
> +++ b/arch/arm/mach-ep93xx/platform.h
> @@ -34,7 +34,7 @@ void ep93xx_register_ac97(void);
> void ep93xx_register_ide(void);
> void ep93xx_register_adc(void);
>
> -struct device *ep93xx_init_devices(void);
> +void ep93xx_init_devices(void);
> extern void ep93xx_timer_init(void);
>
> void ep93xx_restart(enum reboot_mode, const char *);
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ARM: ep93xx: Avoid soc_device_to_device()
@ 2019-11-11 23:17 ` Alexander Sverdlin
0 siblings, 0 replies; 6+ messages in thread
From: Alexander Sverdlin @ 2019-11-11 23:17 UTC (permalink / raw)
To: Andreas Färber, Hartley Sweeten
Cc: Greg Kroah-Hartman, linux-kernel, linux-arm-kernel, Russell King
Hi!
On 11/11/2019 23:37, Andreas Färber wrote:
> ep93xx_init_soc() uses soc_device_to_device() to return a device
> to ep93xx_init_devices(), where it is passed on to its callers,
> who all ignore the return value. As this helper is deprecated,
> change the return type of ep93xx_init_devices() to void and
> have ep93xx_init_soc() return the soc_device instead.
>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
> ---
> arch/arm/mach-ep93xx/core.c | 12 ++++--------
> arch/arm/mach-ep93xx/platform.h | 2 +-
> 2 files changed, 5 insertions(+), 9 deletions(-)
>
> diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
> index 6fb19a393fd2..7a0c82b30564 100644
> --- a/arch/arm/mach-ep93xx/core.c
> +++ b/arch/arm/mach-ep93xx/core.c
> @@ -937,7 +937,7 @@ static const char __init *ep93xx_get_machine_name(void)
> return kasprintf(GFP_KERNEL,"%s", machine_desc->name);
> }
>
> -static struct device __init *ep93xx_init_soc(void)
> +static struct soc_device __init *ep93xx_init_soc(void)
> {
> struct soc_device_attribute *soc_dev_attr;
> struct soc_device *soc_dev;
> @@ -958,13 +958,11 @@ static struct device __init *ep93xx_init_soc(void)
> return NULL;
> }
>
> - return soc_device_to_device(soc_dev);
> + return soc_dev;
> }
>
> -struct device __init *ep93xx_init_devices(void)
> +void __init ep93xx_init_devices(void)
> {
> - struct device *parent;
> -
> /* Disallow access to MaverickCrunch initially */
> ep93xx_devcfg_clear_bits(EP93XX_SYSCON_DEVCFG_CPENA);
>
> @@ -975,7 +973,7 @@ struct device __init *ep93xx_init_devices(void)
> EP93XX_SYSCON_DEVCFG_GONIDE |
> EP93XX_SYSCON_DEVCFG_HONIDE);
>
> - parent = ep93xx_init_soc();
> + ep93xx_init_soc();
>
> /* Get the GPIO working early, other devices need it */
> platform_device_register(&ep93xx_gpio_device);
> @@ -989,8 +987,6 @@ struct device __init *ep93xx_init_devices(void)
> platform_device_register(&ep93xx_wdt_device);
>
> gpio_led_register_device(-1, &ep93xx_led_data);
> -
> - return parent;
> }
>
> void ep93xx_restart(enum reboot_mode mode, const char *cmd)
> diff --git a/arch/arm/mach-ep93xx/platform.h b/arch/arm/mach-ep93xx/platform.h
> index b4045a186239..8a3a2be50f11 100644
> --- a/arch/arm/mach-ep93xx/platform.h
> +++ b/arch/arm/mach-ep93xx/platform.h
> @@ -34,7 +34,7 @@ void ep93xx_register_ac97(void);
> void ep93xx_register_ide(void);
> void ep93xx_register_adc(void);
>
> -struct device *ep93xx_init_devices(void);
> +void ep93xx_init_devices(void);
> extern void ep93xx_timer_init(void);
>
> void ep93xx_restart(enum reboot_mode, const char *);
_______________________________________________
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] 6+ messages in thread
* Re: [PATCH] ARM: ep93xx: Avoid soc_device_to_device()
2019-11-11 22:37 ` Andreas Färber
@ 2019-11-12 5:36 ` Greg Kroah-Hartman
-1 siblings, 0 replies; 6+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-12 5:36 UTC (permalink / raw)
To: Andreas Färber
Cc: Hartley Sweeten, Alexander Sverdlin, linux-arm-kernel,
linux-kernel, Russell King
On Mon, Nov 11, 2019 at 11:37:22PM +0100, Andreas Färber wrote:
> ep93xx_init_soc() uses soc_device_to_device() to return a device
> to ep93xx_init_devices(), where it is passed on to its callers,
> who all ignore the return value. As this helper is deprecated,
> change the return type of ep93xx_init_devices() to void and
> have ep93xx_init_soc() return the soc_device instead.
>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Andreas Färber <afaerber@suse.de>
> ---
> arch/arm/mach-ep93xx/core.c | 12 ++++--------
> arch/arm/mach-ep93xx/platform.h | 2 +-
> 2 files changed, 5 insertions(+), 9 deletions(-)
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ARM: ep93xx: Avoid soc_device_to_device()
@ 2019-11-12 5:36 ` Greg Kroah-Hartman
0 siblings, 0 replies; 6+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-12 5:36 UTC (permalink / raw)
To: Andreas Färber
Cc: Hartley Sweeten, Alexander Sverdlin, linux-kernel,
linux-arm-kernel, Russell King
On Mon, Nov 11, 2019 at 11:37:22PM +0100, Andreas Färber wrote:
> ep93xx_init_soc() uses soc_device_to_device() to return a device
> to ep93xx_init_devices(), where it is passed on to its callers,
> who all ignore the return value. As this helper is deprecated,
> change the return type of ep93xx_init_devices() to void and
> have ep93xx_init_soc() return the soc_device instead.
>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Andreas Färber <afaerber@suse.de>
> ---
> arch/arm/mach-ep93xx/core.c | 12 ++++--------
> arch/arm/mach-ep93xx/platform.h | 2 +-
> 2 files changed, 5 insertions(+), 9 deletions(-)
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
_______________________________________________
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] 6+ messages in thread
end of thread, other threads:[~2019-11-12 5:36 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-11 22:37 [PATCH] ARM: ep93xx: Avoid soc_device_to_device() Andreas Färber
2019-11-11 22:37 ` Andreas Färber
2019-11-11 23:17 ` Alexander Sverdlin
2019-11-11 23:17 ` Alexander Sverdlin
2019-11-12 5:36 ` Greg Kroah-Hartman
2019-11-12 5:36 ` Greg Kroah-Hartman
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.