linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Bjørn Mork" <bjorn@mork.no>
To: David Miller <davem@davemloft.net>
Cc: sfr@canb.auug.org.au, david.daney@cavium.com,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	paul.gortmaker@windriver.com, rdunlap@xenotime.net,
	linux-next@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	"Bjørn Mork" <bjorn@mork.no>
Subject: [PATCH] net: of/phy: fix build error when phylib is built as a module
Date: Fri, 11 May 2012 17:47:01 +0200	[thread overview]
Message-ID: <1336751221-19127-1-git-send-email-bjorn@mork.no> (raw)
In-Reply-To: <20120510.224352.2149006669429730060.davem@davemloft.net>

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>
---
I wonder if this could be as banal as this?  Not even build tested...

Should be wrapped into commit 25106022 if it works, to ensure
bisectability.



Bjørn

 drivers/net/phy/mdio_bus.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
index 83d5c9f..683ef1c 100644
--- a/drivers/net/phy/mdio_bus.c
+++ b/drivers/net/phy/mdio_bus.c
@@ -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)
 {
-- 
1.7.10

  reply	other threads:[~2012-05-11 15:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20120510192635.c6f3a55196bbf65f13956e44@canb.auug.org.au>
     [not found] ` <4FAC35E2.4060900@xenotime.net>
2012-05-11  2:36   ` linux-next: Tree for May 10 (net/phy) Paul Gortmaker
2012-05-11  2:43     ` David Miller
2012-05-11 15:47       ` Bjørn Mork [this message]
2012-05-11 17:58         ` [PATCH] net: of/phy: fix build error when phylib is built as a module David Daney
2012-05-11 22:03           ` David Miller
2012-05-11 21:24         ` David Miller
2012-05-11 23:50         ` Randy Dunlap
2012-05-11 16:14       ` linux-next: Tree for May 10 (net/phy) David Daney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1336751221-19127-1-git-send-email-bjorn@mork.no \
    --to=bjorn@mork.no \
    --cc=davem@davemloft.net \
    --cc=david.daney@cavium.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=netdev@vger.kernel.org \
    --cc=paul.gortmaker@windriver.com \
    --cc=rdunlap@xenotime.net \
    --cc=sfr@canb.auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).