Skip to content

Commit

Permalink
gianfar: Fixup use of BUS_ID_SIZE
Browse files Browse the repository at this point in the history
Commit b31a1d8 ("gianfar: Convert
gianfar to an of_platform_driver") went back to using BUS_ID_SIZE
instead of sizeof() as per the larger patch series that will remove
"char bus_id[20]" from struct device.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Kumar Gala authored and David S. Miller committed Jan 8, 2009
1 parent bd531e3 commit a1d8f60
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/net/gianfar.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,8 @@ static int gfar_of_init(struct net_device *dev)
goto err_out;
}

snprintf(priv->phy_bus_id, BUS_ID_SIZE, PHY_ID_FMT, "0",
fixed_link[0]);
snprintf(priv->phy_bus_id, sizeof(priv->phy_bus_id),
PHY_ID_FMT, "0", fixed_link[0]);
} else {
phy = of_find_node_by_phandle(*ph);

Expand All @@ -256,7 +256,7 @@ static int gfar_of_init(struct net_device *dev)
of_node_put(mdio);

gfar_mdio_bus_name(bus_name, mdio);
snprintf(priv->phy_bus_id, BUS_ID_SIZE, "%s:%02x",
snprintf(priv->phy_bus_id, sizeof(priv->phy_bus_id), "%s:%02x",
bus_name, *id);
}

Expand Down

0 comments on commit a1d8f60

Please sign in to comment.