diff options
author | Adrian Bunk <bunk@kernel.org> | 2008-10-13 00:15:17 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-10-13 00:15:17 -0400 |
commit | 0ed0563e14dcb9986241d30f08ecd33f9bcc3572 (patch) | |
tree | b97dab46ad2ac0e5cb3daff1485200c3833e8384 /drivers/net/bfin_mac.c | |
parent | 1947b36d8f7eb706972bd50fceb063d317d62570 (diff) |
net/bfin_mac.c MDIO namespace fixes
Commit 2e888103295f47b8fcbf7e9bb8c5da97dd2ecd76
(phylib: add mdiobus_{read,write}) causes the
following compile error:
<-- snip -->
...
CC drivers/net/bfin_mac.o
drivers/net/bfin_mac.c:272: error: conflicting types for 'mdiobus_read'
include/linux/phy.h:130: error: previous declaration of 'mdiobus_read' was here
drivers/net/bfin_mac.c:287: error: conflicting types for 'mdiobus_write'
include/linux/phy.h:131: error: previous declaration of 'mdiobus_write' was here
make[3]: *** [drivers/net/bfin_mac.o] Error 1
<-- snip -->
This patch prefixes the driver functions with bfin_
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bfin_mac.c')
-rw-r--r-- | drivers/net/bfin_mac.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c index a0d41c5d97d8..b458d607a9c6 100644 --- a/drivers/net/bfin_mac.c +++ b/drivers/net/bfin_mac.c | |||
@@ -253,7 +253,7 @@ init_error: | |||
253 | * MII operations | 253 | * MII operations |
254 | */ | 254 | */ |
255 | /* Wait until the previous MDC/MDIO transaction has completed */ | 255 | /* Wait until the previous MDC/MDIO transaction has completed */ |
256 | static void mdio_poll(void) | 256 | static void bfin_mdio_poll(void) |
257 | { | 257 | { |
258 | int timeout_cnt = MAX_TIMEOUT_CNT; | 258 | int timeout_cnt = MAX_TIMEOUT_CNT; |
259 | 259 | ||
@@ -269,25 +269,25 @@ static void mdio_poll(void) | |||
269 | } | 269 | } |
270 | 270 | ||
271 | /* Read an off-chip register in a PHY through the MDC/MDIO port */ | 271 | /* Read an off-chip register in a PHY through the MDC/MDIO port */ |
272 | static int mdiobus_read(struct mii_bus *bus, int phy_addr, int regnum) | 272 | static int bfin_mdiobus_read(struct mii_bus *bus, int phy_addr, int regnum) |
273 | { | 273 | { |
274 | mdio_poll(); | 274 | bfin_mdio_poll(); |
275 | 275 | ||
276 | /* read mode */ | 276 | /* read mode */ |
277 | bfin_write_EMAC_STAADD(SET_PHYAD((u16) phy_addr) | | 277 | bfin_write_EMAC_STAADD(SET_PHYAD((u16) phy_addr) | |
278 | SET_REGAD((u16) regnum) | | 278 | SET_REGAD((u16) regnum) | |
279 | STABUSY); | 279 | STABUSY); |
280 | 280 | ||
281 | mdio_poll(); | 281 | bfin_mdio_poll(); |
282 | 282 | ||
283 | return (int) bfin_read_EMAC_STADAT(); | 283 | return (int) bfin_read_EMAC_STADAT(); |
284 | } | 284 | } |
285 | 285 | ||
286 | /* Write an off-chip register in a PHY through the MDC/MDIO port */ | 286 | /* Write an off-chip register in a PHY through the MDC/MDIO port */ |
287 | static int mdiobus_write(struct mii_bus *bus, int phy_addr, int regnum, | 287 | static int bfin_mdiobus_write(struct mii_bus *bus, int phy_addr, int regnum, |
288 | u16 value) | 288 | u16 value) |
289 | { | 289 | { |
290 | mdio_poll(); | 290 | bfin_mdio_poll(); |
291 | 291 | ||
292 | bfin_write_EMAC_STADAT((u32) value); | 292 | bfin_write_EMAC_STADAT((u32) value); |
293 | 293 | ||
@@ -297,12 +297,12 @@ static int mdiobus_write(struct mii_bus *bus, int phy_addr, int regnum, | |||
297 | STAOP | | 297 | STAOP | |
298 | STABUSY); | 298 | STABUSY); |
299 | 299 | ||
300 | mdio_poll(); | 300 | bfin_mdio_poll(); |
301 | 301 | ||
302 | return 0; | 302 | return 0; |
303 | } | 303 | } |
304 | 304 | ||
305 | static int mdiobus_reset(struct mii_bus *bus) | 305 | static int bfin_mdiobus_reset(struct mii_bus *bus) |
306 | { | 306 | { |
307 | return 0; | 307 | return 0; |
308 | } | 308 | } |
@@ -818,7 +818,7 @@ static void bfin_mac_enable(void) | |||
818 | bfin_write_DMA1_CONFIG(rx_list_head->desc_a.config); | 818 | bfin_write_DMA1_CONFIG(rx_list_head->desc_a.config); |
819 | 819 | ||
820 | /* Wait MII done */ | 820 | /* Wait MII done */ |
821 | mdio_poll(); | 821 | bfin_mdio_poll(); |
822 | 822 | ||
823 | /* We enable only RX here */ | 823 | /* We enable only RX here */ |
824 | /* ASTP : Enable Automatic Pad Stripping | 824 | /* ASTP : Enable Automatic Pad Stripping |
@@ -1063,9 +1063,9 @@ static int __devinit bfin_mac_probe(struct platform_device *pdev) | |||
1063 | goto out_err_mdiobus_alloc; | 1063 | goto out_err_mdiobus_alloc; |
1064 | 1064 | ||
1065 | lp->mii_bus->priv = ndev; | 1065 | lp->mii_bus->priv = ndev; |
1066 | lp->mii_bus->read = mdiobus_read; | 1066 | lp->mii_bus->read = bfin_mdiobus_read; |
1067 | lp->mii_bus->write = mdiobus_write; | 1067 | lp->mii_bus->write = bfin_mdiobus_write; |
1068 | lp->mii_bus->reset = mdiobus_reset; | 1068 | lp->mii_bus->reset = bfin_mdiobus_reset; |
1069 | lp->mii_bus->name = "bfin_mac_mdio"; | 1069 | lp->mii_bus->name = "bfin_mac_mdio"; |
1070 | snprintf(lp->mii_bus->id, MII_BUS_ID_SIZE, "0"); | 1070 | snprintf(lp->mii_bus->id, MII_BUS_ID_SIZE, "0"); |
1071 | lp->mii_bus->irq = kmalloc(sizeof(int)*PHY_MAX_ADDR, GFP_KERNEL); | 1071 | lp->mii_bus->irq = kmalloc(sizeof(int)*PHY_MAX_ADDR, GFP_KERNEL); |