Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a1d8f601 authored by Kumar Gala's avatar Kumar Gala Committed by David S. Miller
Browse files

gianfar: Fixup use of BUS_ID_SIZE



Commit b31a1d8b ("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: default avatarKumar Gala <galak@kernel.crashing.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent bd531e36
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -238,8 +238,8 @@ static int gfar_of_init(struct net_device *dev)
			goto err_out;
			goto err_out;
		}
		}


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


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


		gfar_mdio_bus_name(bus_name, 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);
				bus_name, *id);
	}
	}