net: of/phy: fix build error when phylib is built as a module
authorBjørn Mork <bjorn@mork.no>
Fri, 11 May 2012 05:47:01 +0000 (05:47 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 11 May 2012 22:03:03 +0000 (18:03 -0400)
CONFIG_OF_MDIO is tristate and will be m if PHYLIB is m.  Use
IS_ENABLED macro to prevent build error:

 ERROR: "of_mdio_find_bus" [drivers/net/phy/mdio-mux.ko] undefined!

Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Cc: David Daney <david.daney@cavium.com>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Acked-by: David Daney <david.daney@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/mdio_bus.c

index 83d5c9f556867b4dfff86beeec37c747c5c37729..683ef1ce55196315a90f69f35f015b4773899830 100644 (file)
@@ -88,7 +88,7 @@ static struct class mdio_bus_class = {
        .dev_release    = mdiobus_release,
 };
 
-#ifdef CONFIG_OF_MDIO
+#if IS_ENABLED(CONFIG_OF_MDIO)
 /* Helper function for of_mdio_find_bus */
 static int of_mdio_bus_match(struct device *dev, void *mdio_bus_np)
 {