diff options
Diffstat (limited to 'drivers/net/phy/mdio-gpio.c')
-rw-r--r-- | drivers/net/phy/mdio-gpio.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/net/phy/mdio-gpio.c b/drivers/net/phy/mdio-gpio.c index 899274f2f9b1..2ed1140df3e9 100644 --- a/drivers/net/phy/mdio-gpio.c +++ b/drivers/net/phy/mdio-gpio.c | |||
@@ -185,17 +185,20 @@ static int __devinit mdio_gpio_probe(struct platform_device *pdev) | |||
185 | { | 185 | { |
186 | struct mdio_gpio_platform_data *pdata; | 186 | struct mdio_gpio_platform_data *pdata; |
187 | struct mii_bus *new_bus; | 187 | struct mii_bus *new_bus; |
188 | int ret; | 188 | int ret, bus_id; |
189 | 189 | ||
190 | if (pdev->dev.of_node) | 190 | if (pdev->dev.of_node) { |
191 | pdata = mdio_gpio_of_get_data(pdev); | 191 | pdata = mdio_gpio_of_get_data(pdev); |
192 | else | 192 | bus_id = of_alias_get_id(pdev->dev.of_node, "mdio-gpio"); |
193 | } else { | ||
193 | pdata = pdev->dev.platform_data; | 194 | pdata = pdev->dev.platform_data; |
195 | bus_id = pdev->id; | ||
196 | } | ||
194 | 197 | ||
195 | if (!pdata) | 198 | if (!pdata) |
196 | return -ENODEV; | 199 | return -ENODEV; |
197 | 200 | ||
198 | new_bus = mdio_gpio_bus_init(&pdev->dev, pdata, pdev->id); | 201 | new_bus = mdio_gpio_bus_init(&pdev->dev, pdata, bus_id); |
199 | if (!new_bus) | 202 | if (!new_bus) |
200 | return -ENODEV; | 203 | return -ENODEV; |
201 | 204 | ||