Skip to content

Commit f8ef123

Browse files
committed
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: 94b0bd3 ("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>
1 parent 861bc1d commit f8ef123

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

arch/arm/mach-orion5x/board-dt.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ static void __init orion5x_dt_init(void)
6060
if (of_machine_is_compatible("maxtor,shared-storage-2"))
6161
mss2_init();
6262

63+
if (of_machine_is_compatible("lacie,d2-network"))
64+
d2net_init();
65+
6366
of_platform_default_populate(NULL, orion5x_auxdata_lookup, NULL);
6467
}
6568

arch/arm/mach-orion5x/common.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@ extern void mss2_init(void);
7373
static inline void mss2_init(void) {}
7474
#endif
7575

76+
#ifdef CONFIG_MACH_D2NET_DT
77+
void d2net_init(void);
78+
#else
79+
static inline void d2net_init(void) {}
80+
#endif
81+
7682
/*****************************************************************************
7783
* Helpers to access Orion registers
7884
****************************************************************************/

0 commit comments

Comments
 (0)