aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@kernel.org>2008-10-13 00:02:19 -0400
committerDavid S. Miller <davem@davemloft.net>2008-10-13 00:02:19 -0400
commit1210dde7b39fef3120464d9f3660631689d1c0ed (patch)
tree36e483e02b5cc777128c985763dcefc289a3e892 /drivers
parent51cf756c0a056dfb3d7ccdddff3b055cbf44a31c (diff)
net/au1000_eth.c MDIO namespace fixes
Commit 2e888103295f47b8fcbf7e9bb8c5da97dd2ecd76 (phylib: add mdiobus_{read,write}) causes the following compile error: <-- snip --> ... CC drivers/net/au1000_eth.o drivers/net/au1000_eth.c:252: error: conflicting types for 'mdiobus_read' include/linux/phy.h:130: error: previous declaration of 'mdiobus_read' was here drivers/net/au1000_eth.c:263: error: conflicting types for 'mdiobus_write' include/linux/phy.h:131: error: previous declaration of 'mdiobus_write' was here ... make[3]: *** [drivers/net/au1000_eth.o] Error 1 <-- snip --> This patch prefixes the driver functions with au1000_ Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/au1000_eth.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/drivers/net/au1000_eth.c b/drivers/net/au1000_eth.c
index 7b92201a7b50..019b13c08ae6 100644
--- a/drivers/net/au1000_eth.c
+++ b/drivers/net/au1000_eth.c
@@ -94,8 +94,8 @@ static irqreturn_t au1000_interrupt(int, void *);
94static void au1000_tx_timeout(struct net_device *); 94static void au1000_tx_timeout(struct net_device *);
95static void set_rx_mode(struct net_device *); 95static void set_rx_mode(struct net_device *);
96static int au1000_ioctl(struct net_device *, struct ifreq *, int); 96static int au1000_ioctl(struct net_device *, struct ifreq *, int);
97static int mdio_read(struct net_device *, int, int); 97static int au1000_mdio_read(struct net_device *, int, int);
98static void mdio_write(struct net_device *, int, int, u16); 98static void au1000_mdio_write(struct net_device *, int, int, u16);
99static void au1000_adjust_link(struct net_device *); 99static void au1000_adjust_link(struct net_device *);
100static void enable_mac(struct net_device *, int); 100static void enable_mac(struct net_device *, int);
101 101
@@ -191,7 +191,7 @@ struct au1000_private *au_macs[NUM_ETH_INTERFACES];
191/* 191/*
192 * MII operations 192 * MII operations
193 */ 193 */
194static int mdio_read(struct net_device *dev, int phy_addr, int reg) 194static int au1000_mdio_read(struct net_device *dev, int phy_addr, int reg)
195{ 195{
196 struct au1000_private *aup = (struct au1000_private *) dev->priv; 196 struct au1000_private *aup = (struct au1000_private *) dev->priv;
197 volatile u32 *const mii_control_reg = &aup->mac->mii_control; 197 volatile u32 *const mii_control_reg = &aup->mac->mii_control;
@@ -225,7 +225,8 @@ static int mdio_read(struct net_device *dev, int phy_addr, int reg)
225 return (int)*mii_data_reg; 225 return (int)*mii_data_reg;
226} 226}
227 227
228static void mdio_write(struct net_device *dev, int phy_addr, int reg, u16 value) 228static void au1000_mdio_write(struct net_device *dev, int phy_addr,
229 int reg, u16 value)
229{ 230{
230 struct au1000_private *aup = (struct au1000_private *) dev->priv; 231 struct au1000_private *aup = (struct au1000_private *) dev->priv;
231 volatile u32 *const mii_control_reg = &aup->mac->mii_control; 232 volatile u32 *const mii_control_reg = &aup->mac->mii_control;
@@ -249,7 +250,7 @@ static void mdio_write(struct net_device *dev, int phy_addr, int reg, u16 value)
249 *mii_control_reg = mii_control; 250 *mii_control_reg = mii_control;
250} 251}
251 252
252static int mdiobus_read(struct mii_bus *bus, int phy_addr, int regnum) 253static int au1000_mdiobus_read(struct mii_bus *bus, int phy_addr, int regnum)
253{ 254{
254 /* WARNING: bus->phy_map[phy_addr].attached_dev == dev does 255 /* WARNING: bus->phy_map[phy_addr].attached_dev == dev does
255 * _NOT_ hold (e.g. when PHY is accessed through other MAC's MII bus) */ 256 * _NOT_ hold (e.g. when PHY is accessed through other MAC's MII bus) */
@@ -257,21 +258,21 @@ static int mdiobus_read(struct mii_bus *bus, int phy_addr, int regnum)
257 258
258 enable_mac(dev, 0); /* make sure the MAC associated with this 259 enable_mac(dev, 0); /* make sure the MAC associated with this
259 * mii_bus is enabled */ 260 * mii_bus is enabled */
260 return mdio_read(dev, phy_addr, regnum); 261 return au1000_mdio_read(dev, phy_addr, regnum);
261} 262}
262 263
263static int mdiobus_write(struct mii_bus *bus, int phy_addr, int regnum, 264static int au1000_mdiobus_write(struct mii_bus *bus, int phy_addr, int regnum,
264 u16 value) 265 u16 value)
265{ 266{
266 struct net_device *const dev = bus->priv; 267 struct net_device *const dev = bus->priv;
267 268
268 enable_mac(dev, 0); /* make sure the MAC associated with this 269 enable_mac(dev, 0); /* make sure the MAC associated with this
269 * mii_bus is enabled */ 270 * mii_bus is enabled */
270 mdio_write(dev, phy_addr, regnum, value); 271 au1000_mdio_write(dev, phy_addr, regnum, value);
271 return 0; 272 return 0;
272} 273}
273 274
274static int mdiobus_reset(struct mii_bus *bus) 275static int au1000_mdiobus_reset(struct mii_bus *bus)
275{ 276{
276 struct net_device *const dev = bus->priv; 277 struct net_device *const dev = bus->priv;
277 278
@@ -703,9 +704,9 @@ static struct net_device * au1000_probe(int port_num)
703 goto err_out; 704 goto err_out;
704 705
705 aup->mii_bus->priv = dev; 706 aup->mii_bus->priv = dev;
706 aup->mii_bus->read = mdiobus_read; 707 aup->mii_bus->read = au1000_mdiobus_read;
707 aup->mii_bus->write = mdiobus_write; 708 aup->mii_bus->write = au1000_mdiobus_write;
708 aup->mii_bus->reset = mdiobus_reset; 709 aup->mii_bus->reset = au1000_mdiobus_reset;
709 aup->mii_bus->name = "au1000_eth_mii"; 710 aup->mii_bus->name = "au1000_eth_mii";
710 snprintf(aup->mii_bus->id, MII_BUS_ID_SIZE, "%x", aup->mac_id); 711 snprintf(aup->mii_bus->id, MII_BUS_ID_SIZE, "%x", aup->mac_id);
711 aup->mii_bus->irq = kmalloc(sizeof(int)*PHY_MAX_ADDR, GFP_KERNEL); 712 aup->mii_bus->irq = kmalloc(sizeof(int)*PHY_MAX_ADDR, GFP_KERNEL);