From: Icenowy Zheng Date: Thu, 28 Sep 2017 14:16:38 +0000 (+0800) Subject: sunxi: only init USB Ethernet gadget when it's enabled X-Git-Tag: v2017.11-rc2~129^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e6ee85a6891eca187c9a9364c51690d3f6a36932;p=u-boot sunxi: only init USB Ethernet gadget when it's enabled If the USB Ethernet gadget is not yet enabled, the call of usb_ether_init in board/sunxi/board.c will lead to undefined reference error when building. Fix this problem. Fixes: 50ddbf1199a0 ("sunxi: Register usb_ether") Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard --- diff --git a/board/sunxi/board.c b/board/sunxi/board.c index cb42742dd2..6e13ee32c1 100644 --- a/board/sunxi/board.c +++ b/board/sunxi/board.c @@ -733,7 +733,9 @@ int misc_init_r(void) return ret; #endif +#ifdef CONFIG_USB_ETHER usb_ether_init(); +#endif return 0; }