]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
gianfar: Fixup use of BUS_ID_SIZE
authorKumar Gala <galak@kernel.crashing.org>
Thu, 8 Jan 2009 18:58:38 +0000 (10:58 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 8 Jan 2009 18:58:38 +0000 (10:58 -0800)
Commit b31a1d8b41513b96e9c7ec2f68c5734cef0b26a4 ("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>
drivers/net/gianfar.c

index 7fcc3af3f86bd2ad696145520b71e6d6122b1288..1b8deca8b9f8ee707c34161e43fe391f30d0f753 100644 (file)
@@ -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);
 
@@ -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);
        }