* [PATCH] fsl_pq_mdio: Fix fsl_pq_mdio to work with modules
@ 2009-06-25 8:23 Ionut Nicu
2009-06-26 3:10 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Ionut Nicu @ 2009-06-25 8:23 UTC (permalink / raw)
To: netdev; +Cc: Ionut Nicu
This patch fixes the case when ucc_geth or gianfar are compiled
as modules. Without this patch the call to phy_connect() fails.
Signed-off-by: Ionut Nicu <ionut.nicu@freescale.com>
Acked-by: Andy Fleming <afleming@freescale.com>
---
drivers/net/fsl_pq_mdio.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/fsl_pq_mdio.c b/drivers/net/fsl_pq_mdio.c
index 3af5813..d167090 100644
--- a/drivers/net/fsl_pq_mdio.c
+++ b/drivers/net/fsl_pq_mdio.c
@@ -188,7 +188,7 @@ static int fsl_pq_mdio_find_free(struct mii_bus *new_bus)
}
-#ifdef CONFIG_GIANFAR
+#if defined(CONFIG_GIANFAR) || defined(CONFIG_GIANFAR_MODULE)
static u32 __iomem *get_gfar_tbipa(struct fsl_pq_mdio __iomem *regs)
{
struct gfar __iomem *enet_regs;
@@ -206,7 +206,7 @@ static u32 __iomem *get_gfar_tbipa(struct fsl_pq_mdio __iomem *regs)
#endif
-#ifdef CONFIG_UCC_GETH
+#if defined(CONFIG_UCC_GETH) || defined(CONFIG_UCC_GETH_MODULE)
static int get_ucc_id_for_range(u64 start, u64 end, u32 *ucc_id)
{
struct device_node *np = NULL;
@@ -291,7 +291,7 @@ static int fsl_pq_mdio_probe(struct of_device *ofdev,
if (of_device_is_compatible(np, "fsl,gianfar-mdio") ||
of_device_is_compatible(np, "fsl,gianfar-tbi") ||
of_device_is_compatible(np, "gianfar")) {
-#ifdef CONFIG_GIANFAR
+#if defined(CONFIG_GIANFAR) || defined(CONFIG_GIANFAR_MODULE)
tbipa = get_gfar_tbipa(regs);
#else
err = -ENODEV;
@@ -299,7 +299,7 @@ static int fsl_pq_mdio_probe(struct of_device *ofdev,
#endif
} else if (of_device_is_compatible(np, "fsl,ucc-mdio") ||
of_device_is_compatible(np, "ucc_geth_phy")) {
-#ifdef CONFIG_UCC_GETH
+#if defined(CONFIG_UCC_GETH) || defined(CONFIG_UCC_GETH_MODULE)
u32 id;
static u32 mii_mng_master;
--
1.6.2.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] fsl_pq_mdio: Fix fsl_pq_mdio to work with modules
2009-06-25 8:23 [PATCH] fsl_pq_mdio: Fix fsl_pq_mdio to work with modules Ionut Nicu
@ 2009-06-26 3:10 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2009-06-26 3:10 UTC (permalink / raw)
To: ionut.nicu; +Cc: netdev
From: Ionut Nicu <ionut.nicu@freescale.com>
Date: Thu, 25 Jun 2009 11:23:39 +0300
> This patch fixes the case when ucc_geth or gianfar are compiled
> as modules. Without this patch the call to phy_connect() fails.
>
> Signed-off-by: Ionut Nicu <ionut.nicu@freescale.com>
> Acked-by: Andy Fleming <afleming@freescale.com>
Patch applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-06-26 3:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-25 8:23 [PATCH] fsl_pq_mdio: Fix fsl_pq_mdio to work with modules Ionut Nicu
2009-06-26 3:10 ` David Miller
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).