diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-05-18 13:52:44 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-05-18 13:52:44 -0700 |
commit | 936a0cd52aa5d024c583e36e2f21bf6ec2e527e4 (patch) | |
tree | 01cffc11361be7d671b71ba86463f6649b39d552 /drivers/net/phy/mdio-gpio.c | |
parent | 36bf51acc89d113f101e40f40af4ab53fbf5b60a (diff) | |
parent | e26081808edadfd257c6c9d81014e3b25e9a6118 (diff) | |
download | linux-936a0cd52aa5d024c583e36e2f21bf6ec2e527e4.tar.gz |
Merge 4.1-rc4 into staging-next
We want the fixes in here for testing and merge issues.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net/phy/mdio-gpio.c')
-rw-r--r-- | drivers/net/phy/mdio-gpio.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/phy/mdio-gpio.c b/drivers/net/phy/mdio-gpio.c index c9cb486c753d..53d18150f4e2 100644 --- a/drivers/net/phy/mdio-gpio.c +++ b/drivers/net/phy/mdio-gpio.c @@ -168,7 +168,10 @@ static struct mii_bus *mdio_gpio_bus_init(struct device *dev, if (!new_bus->irq[i]) new_bus->irq[i] = PHY_POLL; - snprintf(new_bus->id, MII_BUS_ID_SIZE, "gpio-%x", bus_id); + if (bus_id != -1) + snprintf(new_bus->id, MII_BUS_ID_SIZE, "gpio-%x", bus_id); + else + strncpy(new_bus->id, "gpio", MII_BUS_ID_SIZE); if (devm_gpio_request(dev, bitbang->mdc, "mdc")) goto out_free_bus; |