diff options
Diffstat (limited to 'drivers/net/mdio/mdio-gpio.c')
-rw-r--r-- | drivers/net/mdio/mdio-gpio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/mdio/mdio-gpio.c b/drivers/net/mdio/mdio-gpio.c index 897b88c50b..778db310a2 100644 --- a/drivers/net/mdio/mdio-gpio.c +++ b/drivers/net/mdio/mdio-gpio.c @@ -123,9 +123,9 @@ static struct mii_bus *mdio_gpio_bus_init(struct device *dev, new_bus->parent = dev; if (bus_id != -1) - snprintf(new_bus->id, MII_BUS_ID_SIZE, "gpio-%x", bus_id); + snprintf(new_bus->id, sizeof(new_bus->id), "gpio-%x", bus_id); else - strncpy(new_bus->id, "gpio", MII_BUS_ID_SIZE); + strscpy(new_bus->id, "gpio", sizeof(new_bus->id)); if (pdata) { new_bus->phy_mask = pdata->phy_mask; |