ARM: orion5x: make dns323 independent of PHY support
authorArnd Bergmann <arnd@arndb.de>
Thu, 13 Mar 2014 14:31:44 +0000 (15:31 +0100)
committerArnd Bergmann <arnd@arndb.de>
Fri, 21 Mar 2014 17:25:59 +0000 (18:25 +0100)
The D-Link DNS-323 machine tries to unconditionally select CONFIG_PHYLIB,
but that has other dependencies that might not necessarily be enabled,
causing random build errors.

To work around this, this patch removes the 'select' statement and
instead uses a compile-time check to skip the phy_register_fixup_for_uid()
call if PHYLIB is not available in the kernel.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Jason Cooper <jason@lakedaemon.net>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Gregory Clement <gregory.clement@free-electrons.com>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
arch/arm/mach-orion5x/Kconfig
arch/arm/mach-orion5x/dns323-setup.c

index 2cb2f06c20f59130e2b34fc793c67b2a65be3043..14f2cae4109ca10fc61962b4d787a5f89ed70097 100644 (file)
@@ -33,7 +33,6 @@ config MACH_KUROBOX_PRO
 config MACH_DNS323
        bool "D-Link DNS-323"
        select I2C_BOARDINFO
-       select PHYLIB
        help
          Say 'Y' here if you want your kernel to support the
          D-Link DNS-323 platform.
index 70974732cbf0eb541af1f5512567638638d088c8..56edeab17b68dedf77f538fd5fdb1d2465598dab 100644 (file)
@@ -642,6 +642,8 @@ static void __init dns323_init(void)
                platform_device_register_simple("dns323c-fan", 0, NULL, 0);
 
                /* Register fixup for the PHY LEDs */
+               if (!IS_BUILTIN(CONFIG_PHYLIB))
+                       break;
                phy_register_fixup_for_uid(MARVELL_PHY_ID_88E1118,
                                           MARVELL_PHY_ID_MASK,
                                           dns323c_phy_fixup);