Skip to contentSkip to conversation

ARM: shmobile: Remove unused auxdata and callbacks

PATCH New Magnus Damm 1 participant 8 messages Jul 1, 2013

Subsystems (4)
lore
Share & tools
lore

Magnus Damm

author maintainer
#0 lore raw

v2 cover ARM: shmobile: Remove unused auxdata and callbacks

ARM: shmobile: Remove unused auxdata and callbacks

[PATCH 01/07] ARM: shmobile: Remove unused EMEV2 auxdata and callback [PATCH 02/07] ARM: shmobile: Remove unused r8a7740 auxdata table [PATCH 03/07] ARM: shmobile: Remove unused r8a7778 auxdata and callback [PATCH 04/07] ARM: shmobile: Remove unused r8a7779 auxdata table [PATCH 05/07] ARM: shmobile: Remove unused sh7372 auxdata table [PATCH 06/07] ARM: shmobile: Remove unused sh73a0 auxdata table [PATCH 07/07] ARM: shmobile: Remove redundant r8a7790 callback

Rework the mach-shmobile code to pass NULL to of_platform_populate() instead of empty lists. This cleans up the code and reduces the number of lines. New in V2: Remove init_machine() callbacks that only call of_platform_populate(), thanks to Arnd for his advice!

---

Written against renesas.git renesas-next-20130701

 arch/arm/mach-shmobile/setup-emev2.c   |   10 ----------
 arch/arm/mach-shmobile/setup-r8a7740.c |    7 +------
 arch/arm/mach-shmobile/setup-r8a7778.c |   11 -----------
 arch/arm/mach-shmobile/setup-r8a7779.c |    7 +------
 arch/arm/mach-shmobile/setup-r8a7790.c |    5 -----
 arch/arm/mach-shmobile/setup-sh7372.c  |    7 +------
 arch/arm/mach-shmobile/setup-sh73a0.c  |    7 +------
 7 files changed, 4 insertions(+), 50 deletions(-)
author maintainer
#1 lore raw

PATCH v2 1/7 ARM: shmobile: Remove unused EMEV2 auxdata and callback

From: Magnus Damm <[email protected]>

Replace the SoC-specific callback init_machine() with a NULL to use the default code. This cleans up the code and reduces the number of lines.

---

 arch/arm/mach-shmobile/setup-emev2.c |   10 ----------
 1 file changed, 10 deletions(-)
arch/arm/mach-shmobile/setup-emev2.c +0 -10
@@ -435,15 +435,6 @@ void __init emev2_init_irq(void)
 }
 
 #ifdef CONFIG_USE_OF
-static const struct of_dev_auxdata emev2_auxdata_lookup[] __initconst = {
-	{ }
-};
-
-static void __init emev2_add_standard_devices_dt(void)
-{
-	of_platform_populate(NULL, of_default_bus_match_table,
-			     emev2_auxdata_lookup, NULL);
-}
 
 static const char *emev2_boards_compat_dt[] __initdata = {
 	"renesas,emev2",
@@ -455,7 +446,6 @@ DT_MACHINE_START(EMEV2_DT, "Generic Emma
 	.init_early	= emev2_init_delay,
 	.nr_irqs	= NR_IRQS_LEGACY,
 	.init_irq	= irqchip_init,
-	.init_machine	= emev2_add_standard_devices_dt,
 	.dt_compat	= emev2_boards_compat_dt,
 MACHINE_END
 
author maintainer
#2 lore raw

PATCH v2 2/7 ARM: shmobile: Remove unused r8a7740 auxdata table

In reply to Magnus Damm

From: Magnus Damm <[email protected]>

Pass NULL to of_platform_populate instead of passing an empty list. This cleans up the code and reduces the number of lines.

---

 arch/arm/mach-shmobile/setup-r8a7740.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
arch/arm/mach-shmobile/setup-r8a7740.c +1 -6
@@ -986,16 +986,11 @@ void __init r8a7740_add_early_devices(vo
 
 #ifdef CONFIG_USE_OF
 
-static const struct of_dev_auxdata r8a7740_auxdata_lookup[] __initconst = {
-	{ }
-};
-
 void __init r8a7740_add_standard_devices_dt(void)
 {
 	platform_add_devices(r8a7740_devices_dt,
 			    ARRAY_SIZE(r8a7740_devices_dt));
-	of_platform_populate(NULL, of_default_bus_match_table,
-			     r8a7740_auxdata_lookup, NULL);
+	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 }
 
 void __init r8a7740_init_delay(void)
author maintainer
#3 lore raw

PATCH v2 3/7 ARM: shmobile: Remove unused r8a7778 auxdata and callback

In reply to Magnus Damm

From: Magnus Damm <[email protected]>

Replace the SoC-specific callback init_machine() with a NULL to use the default code. This cleans up the code and reduces the number of lines.

---

 arch/arm/mach-shmobile/setup-r8a7778.c |   11 -----------
 1 file changed, 11 deletions(-)
arch/arm/mach-shmobile/setup-r8a7778.c +0 -11
@@ -457,16 +457,6 @@ void __init r8a7778_init_irq_dt(void)
 	r8a7778_init_irq_common();
 }
 
-static const struct of_dev_auxdata r8a7778_auxdata_lookup[] __initconst = {
-	{},
-};
-
-void __init r8a7778_add_standard_devices_dt(void)
-{
-	of_platform_populate(NULL, of_default_bus_match_table,
-			     r8a7778_auxdata_lookup, NULL);
-}
-
 static const char *r8a7778_compat_dt[] __initdata = {
 	"renesas,r8a7778",
 	NULL,
@@ -475,7 +465,6 @@ static const char *r8a7778_compat_dt[] _
 DT_MACHINE_START(R8A7778_DT, "Generic R8A7778 (Flattened Device Tree)")
 	.init_early	= r8a7778_init_delay,
 	.init_irq	= r8a7778_init_irq_dt,
-	.init_machine	= r8a7778_add_standard_devices_dt,
 	.init_time	= shmobile_timer_init,
 	.dt_compat	= r8a7778_compat_dt,
 	.init_late      = r8a7778_init_late,
author maintainer
#4 lore raw

PATCH v2 4/7 ARM: shmobile: Remove unused r8a7779 auxdata table

In reply to Magnus Damm

From: Magnus Damm <[email protected]>

Pass NULL to of_platform_populate instead of passing an empty list. This cleans up the code and reduces the number of lines.

---

 arch/arm/mach-shmobile/setup-r8a7779.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
arch/arm/mach-shmobile/setup-r8a7779.c +1 -6
@@ -665,10 +665,6 @@ void __init r8a7779_init_delay(void)
 	shmobile_setup_delay(1000, 2, 4); /* Cortex-A9 @ 1000MHz */
 }
 
-static const struct of_dev_auxdata r8a7779_auxdata_lookup[] __initconst = {
-	{},
-};
-
 void __init r8a7779_add_standard_devices_dt(void)
 {
 	/* clocks are setup late during boot in the case of DT */
@@ -676,8 +672,7 @@ void __init r8a7779_add_standard_devices
 
 	platform_add_devices(r8a7779_devices_dt,
 			     ARRAY_SIZE(r8a7779_devices_dt));
-	of_platform_populate(NULL, of_default_bus_match_table,
-			     r8a7779_auxdata_lookup, NULL);
+	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 }
 
 static const char *r8a7779_compat_dt[] __initdata = {
author maintainer
#5 lore raw

PATCH v2 5/7 ARM: shmobile: Remove unused sh7372 auxdata table

In reply to Magnus Damm

From: Magnus Damm <[email protected]>

Pass NULL to of_platform_populate instead of passing an empty list. This cleans up the code and reduces the number of lines.

---

 arch/arm/mach-shmobile/setup-sh7372.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
arch/arm/mach-shmobile/setup-sh7372.c +1 -6
@@ -1147,10 +1147,6 @@ void __init sh7372_add_early_devices_dt(
 	shmobile_setup_console();
 }
 
-static const struct of_dev_auxdata sh7372_auxdata_lookup[] __initconst = {
-	{ }
-};
-
 void __init sh7372_add_standard_devices_dt(void)
 {
 	/* clocks are setup late during boot in the case of DT */
@@ -1159,8 +1155,7 @@ void __init sh7372_add_standard_devices_
 	platform_add_devices(sh7372_early_devices,
 			    ARRAY_SIZE(sh7372_early_devices));
 
-	of_platform_populate(NULL, of_default_bus_match_table,
-			     sh7372_auxdata_lookup, NULL);
+	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 }
 
 static const char *sh7372_boards_compat_dt[] __initdata = {
author maintainer
#6 lore raw

PATCH v2 6/7 ARM: shmobile: Remove unused sh73a0 auxdata table

In reply to Magnus Damm

From: Magnus Damm <[email protected]>

Pass NULL to of_platform_populate instead of passing an empty list. This cleans up the code and reduces the number of lines.

---

 arch/arm/mach-shmobile/setup-sh73a0.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
arch/arm/mach-shmobile/setup-sh73a0.c +1 -6
@@ -958,10 +958,6 @@ void __init sh73a0_add_early_devices(voi
 
 #ifdef CONFIG_USE_OF
 
-static const struct of_dev_auxdata sh73a0_auxdata_lookup[] __initconst = {
-	{},
-};
-
 void __init sh73a0_add_standard_devices_dt(void)
 {
 	struct platform_device_info devinfo = { .name = "cpufreq-cpu0", .id = -1, };
@@ -971,8 +967,7 @@ void __init sh73a0_add_standard_devices_
 
 	platform_add_devices(sh73a0_devices_dt,
 			     ARRAY_SIZE(sh73a0_devices_dt));
-	of_platform_populate(NULL, of_default_bus_match_table,
-			     sh73a0_auxdata_lookup, NULL);
+	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 
 	/* Instantiate cpufreq-cpu0 */
 	platform_device_register_full(&devinfo);
author maintainer
#7 lore raw

PATCH v2 7/7 ARM: shmobile: Remove redundant r8a7790 callback

In reply to Magnus Damm

From: Magnus Damm <[email protected]>

Replace the SoC-specific callback init_machine() with a NULL to use the default code. This cleans up the code and reduces the number of lines.

---

 arch/arm/mach-shmobile/setup-r8a7790.c |    5 -----
 1 file changed, 5 deletions(-)
arch/arm/mach-shmobile/setup-r8a7790.c +0 -5
@@ -217,10 +217,6 @@ void __init r8a7790_init_delay(void)
 }
 
 #ifdef CONFIG_USE_OF
-void __init r8a7790_add_standard_devices_dt(void)
-{
-	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
-}
 
 static const char *r8a7790_boards_compat_dt[] __initdata = {
 	"renesas,r8a7790",
@@ -230,7 +226,6 @@ static const char *r8a7790_boards_compat
 DT_MACHINE_START(R8A7790_DT, "Generic R8A7790 (Flattened Device Tree)")
 	.init_early	= r8a7790_init_delay,
 	.init_irq	= irqchip_init,
-	.init_machine	= r8a7790_add_standard_devices_dt,
 	.init_time	= r8a7790_timer_init,
 	.dt_compat	= r8a7790_boards_compat_dt,
 MACHINE_END