Skip to content

Commit f175f56

Browse files
arndbgregkh
authored andcommitted
ARM: orion5x: fix d2net gpio initialization
commit f8ef123 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 365f318 commit f175f56

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
@@ -63,6 +63,9 @@ static void __init orion5x_dt_init(void)
6363
if (of_machine_is_compatible("maxtor,shared-storage-2"))
6464
mss2_init();
6565

66+
if (of_machine_is_compatible("lacie,d2-network"))
67+
d2net_init();
68+
6669
of_platform_default_populate(NULL, orion5x_auxdata_lookup, NULL);
6770
}
6871

arch/arm/mach-orion5x/common.h

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

78+
#ifdef CONFIG_MACH_D2NET_DT
79+
void d2net_init(void);
80+
#else
81+
static inline void d2net_init(void) {}
82+
#endif
83+
7884
/*****************************************************************************
7985
* Helpers to access Orion registers
8086
****************************************************************************/

0 commit comments

Comments
 (0)