diff options
author | Matt Redfearn <matt.redfearn@mips.com> | 2017-11-14 10:44:23 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2018-01-10 10:39:03 -0500 |
commit | ecff167cc80dd3c6afff55bdc66b4981d587ba3e (patch) | |
tree | b2ec4f04682292f59918cbac3d954bd37eba24e6 | |
parent | ff9bed94d0f3b82d0fff3599cf0eb2cadf0fc770 (diff) |
MIPS: RB532: Avoid undefined mac_pton without GENERIC_NET_UTILS
Currently MIPS allnoconfig with CONFIG_MIKROTIK_RB532=y fails to link
due to missing support for mac_pton():
LD vmlinux
arch/mips/rb532/devices.o: In function `setup_kmac':
devices.c:(.init.text+0xc): undefined reference to `mac_pton'
Rather than adding dependencies to the platform to force inclusion of
GENERIC_NET_UTILS which is selected by CONFIG_NET, just exclude the
setup of the MAC address if CONFIG_NET is not selected in the kernel
config.
Signed-off-by: Matt Redfearn <matt.redfearn@mips.com>
Cc: James Hogan <james.hogan@mips.com>
Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
Cc: Neil Armstrong <narmstrong@baylibre.com>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Vladimir Zapolskiy <vz@mleia.com>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/17702/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r-- | arch/mips/rb532/devices.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/mips/rb532/devices.c b/arch/mips/rb532/devices.c index 32ea3e6731d6..354d258396ff 100644 --- a/arch/mips/rb532/devices.c +++ b/arch/mips/rb532/devices.c | |||
@@ -310,6 +310,8 @@ static int __init plat_setup_devices(void) | |||
310 | return platform_add_devices(rb532_devs, ARRAY_SIZE(rb532_devs)); | 310 | return platform_add_devices(rb532_devs, ARRAY_SIZE(rb532_devs)); |
311 | } | 311 | } |
312 | 312 | ||
313 | #ifdef CONFIG_NET | ||
314 | |||
313 | static int __init setup_kmac(char *s) | 315 | static int __init setup_kmac(char *s) |
314 | { | 316 | { |
315 | printk(KERN_INFO "korina mac = %s\n", s); | 317 | printk(KERN_INFO "korina mac = %s\n", s); |
@@ -322,4 +324,6 @@ static int __init setup_kmac(char *s) | |||
322 | 324 | ||
323 | __setup("kmac=", setup_kmac); | 325 | __setup("kmac=", setup_kmac); |
324 | 326 | ||
327 | #endif /* CONFIG_NET */ | ||
328 | |||
325 | arch_initcall(plat_setup_devices); | 329 | arch_initcall(plat_setup_devices); |