diff mbox

[03/06] ARM: shmobile: Remove unused r8a7778 auxdata table

Message ID 20130628102958.31451.56355.sendpatchset@w520 (mailing list archive)
State New, archived
Headers show

Commit Message

Magnus Damm June 28, 2013, 10:29 a.m. UTC
From: Magnus Damm <damm@opensource.se>

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

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 arch/arm/mach-shmobile/setup-r8a7778.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

Comments

Arnd Bergmann June 28, 2013, 11:50 a.m. UTC | #1
On Friday 28 June 2013, Magnus Damm wrote:
> ach-shmobile/setup-r8a7778.c
> +++ work/arch/arm/mach-shmobile/setup-r8a7778.c 2013-06-28 15:48:43.000000000 +0900
> @@ -457,14 +457,9 @@ 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);
> +       of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
>  }
>  
>  static const char *r8a7778_compat_dt[] __initdata = {

Since this is now the trivial form of the function, you can
drop r8a7778_add_standard_devices_dt entirely and have a NULL
init_machine pointer. Same for the first two patches.

	Arnd
Magnus Damm July 1, 2013, 3:38 a.m. UTC | #2
Hi Arnd,

On Fri, Jun 28, 2013 at 8:50 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> On Friday 28 June 2013, Magnus Damm wrote:
>> ach-shmobile/setup-r8a7778.c
>> +++ work/arch/arm/mach-shmobile/setup-r8a7778.c 2013-06-28 15:48:43.000000000 +0900
>> @@ -457,14 +457,9 @@ 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);
>> +       of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
>>  }
>>
>>  static const char *r8a7778_compat_dt[] __initdata = {
>
> Since this is now the trivial form of the function, you can
> drop r8a7778_add_standard_devices_dt entirely and have a NULL
> init_machine pointer. Same for the first two patches.

Thanks, I will rework the patches for the SoCs where NULL is possible
and resend the series.

Cheers,

/ magnus
diff mbox

Patch

--- 0001/arch/arm/mach-shmobile/setup-r8a7778.c
+++ work/arch/arm/mach-shmobile/setup-r8a7778.c	2013-06-28 15:48:43.000000000 +0900
@@ -457,14 +457,9 @@  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);
+	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 }
 
 static const char *r8a7778_compat_dt[] __initdata = {