Skip to content

Commit 762c6aa

Browse files
ffainellidavem330
authored andcommitted
cpmac: fix compilation errors against undeclared BUS_ID_SIZE
With the removal of BUS_ID_SIZE, cpmac was not fully converted to use MII_BUS_ID_SIZE as it ought to. This patch fixes the following cpmac build failure: CC drivers/net/cpmac.o drivers/net/cpmac.c: In function 'cpmac_start_xmit': drivers/net/cpmac.c:563: warning: comparison of distinct pointer types lacks a cast drivers/net/cpmac.c: In function 'cpmac_probe': drivers/net/cpmac.c:1112: error: 'BUS_ID_SIZE' undeclared (first use in this function) drivers/net/cpmac.c:1112: error: (Each undeclared identifier is reported only once drivers/net/cpmac.c:1112: error: for each function it appears in.) Reported-by: Ralf Baechle <[email protected]> Signed-off-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent b31c50a commit 762c6aa

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/net/cpmac.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1109,7 +1109,7 @@ static int external_switch;
11091109
static int __devinit cpmac_probe(struct platform_device *pdev)
11101110
{
11111111
int rc, phy_id;
1112-
char mdio_bus_id[BUS_ID_SIZE];
1112+
char mdio_bus_id[MII_BUS_ID_SIZE];
11131113
struct resource *mem;
11141114
struct cpmac_priv *priv;
11151115
struct net_device *dev;
@@ -1118,15 +1118,15 @@ static int __devinit cpmac_probe(struct platform_device *pdev)
11181118
pdata = pdev->dev.platform_data;
11191119

11201120
if (external_switch || dumb_switch) {
1121-
strncpy(mdio_bus_id, "0", BUS_ID_SIZE); /* fixed phys bus */
1121+
strncpy(mdio_bus_id, "0", MII_BUS_ID_SIZE); /* fixed phys bus */
11221122
phy_id = pdev->id;
11231123
} else {
11241124
for (phy_id = 0; phy_id < PHY_MAX_ADDR; phy_id++) {
11251125
if (!(pdata->phy_mask & (1 << phy_id)))
11261126
continue;
11271127
if (!cpmac_mii->phy_map[phy_id])
11281128
continue;
1129-
strncpy(mdio_bus_id, cpmac_mii->id, BUS_ID_SIZE);
1129+
strncpy(mdio_bus_id, cpmac_mii->id, MII_BUS_ID_SIZE);
11301130
break;
11311131
}
11321132
}
@@ -1167,7 +1167,7 @@ static int __devinit cpmac_probe(struct platform_device *pdev)
11671167
priv->msg_enable = netif_msg_init(debug_level, 0xff);
11681168
memcpy(dev->dev_addr, pdata->dev_addr, sizeof(dev->dev_addr));
11691169

1170-
snprintf(priv->phy_name, BUS_ID_SIZE, PHY_ID_FMT, mdio_bus_id, phy_id);
1170+
snprintf(priv->phy_name, MII_BUS_ID_SIZE, PHY_ID_FMT, mdio_bus_id, phy_id);
11711171

11721172
priv->phy = phy_connect(dev, priv->phy_name, &cpmac_adjust_link, 0,
11731173
PHY_INTERFACE_MODE_MII);

0 commit comments

Comments
 (0)