]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ARM: shmobile: r8a7778: cleanup registration of hspi
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 30 Jul 2013 07:02:24 +0000 (00:02 -0700)
committerSimon Horman <horms+renesas@verge.net.au>
Tue, 6 Aug 2013 09:07:09 +0000 (18:07 +0900)
sh-hspi driver which doesn't need platform data at the time of
registration can be registerd on SoC.
And, registering these drivers in the SoC code can avoid
unwanted device numbering issue.
(ex. the hspi2 device number will be spi.0 if hspi2 only registered)
This patch registers it on SoC code as cleanup C code

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
arch/arm/mach-shmobile/board-bockw.c
arch/arm/mach-shmobile/include/mach/r8a7778.h
arch/arm/mach-shmobile/setup-r8a7778.c

index d7d3427400039b884bbaaa4f2252d46bf022721d..b6f3d2f4108f0fa985e9e69da50c2091c42b533c 100644 (file)
@@ -200,7 +200,6 @@ static void __init bockw_init(void)
        r8a7778_init_irq_extpin(1);
        r8a7778_add_standard_devices();
        r8a7778_add_ether_device(&ether_platform_data);
-       r8a7778_add_hspi_device(0);
 
        i2c_register_board_info(0, i2c0_devices,
                                ARRAY_SIZE(i2c0_devices));
index 9874511bbdbb6b089b6acd79a453fd6dfaa2de2d..41fd6da2757478b54fc89aac17915c000cb2a501 100644 (file)
@@ -23,7 +23,6 @@
 extern void r8a7778_add_standard_devices(void);
 extern void r8a7778_add_standard_devices_dt(void);
 extern void r8a7778_add_ether_device(struct sh_eth_plat_data *pdata);
-extern void r8a7778_add_hspi_device(int id);
 extern void r8a7778_add_dt_devices(void);
 
 extern void r8a7778_init_late(void);
index ce3b54dfcc44865be81edc2a7ec24162cfe0e858..1a154d4a490754ea2bf396dec775216916b7c40b 100644 (file)
@@ -272,7 +272,7 @@ static struct resource hspi_resources[] __initdata = {
        DEFINE_RES_IRQ(gic_iid(0x75)),
 };
 
-void __init r8a7778_add_hspi_device(int id)
+void __init r8a7778_register_hspi(int id)
 {
        BUG_ON(id < 0 || id > 2);
 
@@ -312,6 +312,9 @@ void __init r8a7778_add_standard_devices(void)
        r8a7778_register_i2c(1);
        r8a7778_register_i2c(2);
        r8a7778_register_i2c(3);
+       r8a7778_register_hspi(0);
+       r8a7778_register_hspi(1);
+       r8a7778_register_hspi(2);
 }
 
 void __init r8a7778_init_late(void)