Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: orion5x: fix d2net gpio initialization

The DT version of this board has a custom file with the gpio
device. However, it does nothing because the d2net_init()
has no caller or prototype:

arch/arm/mach-orion5x/board-d2net.c:101:13: error: no previous prototype for 'd2net_init'

Call it from the board-dt file as intended.

Fixes: 94b0bd366e36 ("ARM: orion5x: convert d2net to Device Tree")
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20230516153109.514251-10-arnd@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

+9
+3
arch/arm/mach-orion5x/board-dt.c
··· 60 60 if (of_machine_is_compatible("maxtor,shared-storage-2")) 61 61 mss2_init(); 62 62 63 + if (of_machine_is_compatible("lacie,d2-network")) 64 + d2net_init(); 65 + 63 66 of_platform_default_populate(NULL, orion5x_auxdata_lookup, NULL); 64 67 } 65 68
+6
arch/arm/mach-orion5x/common.h
··· 73 73 static inline void mss2_init(void) {} 74 74 #endif 75 75 76 + #ifdef CONFIG_MACH_D2NET_DT 77 + void d2net_init(void); 78 + #else 79 + static inline void d2net_init(void) {} 80 + #endif 81 + 76 82 /***************************************************************************** 77 83 * Helpers to access Orion registers 78 84 ****************************************************************************/