Fix numerous minor problems with new phy subsystem.
Includes fixes for problems noted by Adrian Bunk, Andrew Morton,
and one other person lost in the annals of history (and email folders).
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index e2c6896b..934065d 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -39,7 +39,6 @@
#include <asm/irq.h>
#include <asm/uaccess.h>
-static void phy_change(void *data);
static void phy_timer(unsigned long data);
/* Convenience function to print out the current phy status
@@ -464,7 +463,6 @@
phydev->adjust_state = NULL;
}
-#ifdef CONFIG_PHYCONTROL
/* phy_error:
*
* Moves the PHY to the HALTED state in response to a read
@@ -479,6 +477,10 @@
spin_unlock(&phydev->lock);
}
+#ifdef CONFIG_PHYCONTROL
+
+static void phy_change(void *data);
+
/* phy_interrupt
*
* description: When a PHY interrupt occurs, the handler disables
@@ -672,6 +674,8 @@
EXPORT_SYMBOL(phy_stop);
EXPORT_SYMBOL(phy_start);
+#endif /* CONFIG_PHYCONTROL */
+
/* PHY timer which handles the state machine */
static void phy_timer(unsigned long data)
{
@@ -859,4 +863,3 @@
mod_timer(&phydev->phy_timer, jiffies + PHY_STATE_TIME * HZ);
}
-#endif /* CONFIG_PHYCONTROL */