Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 133861
b: refs/heads/master
c: 57a5749
h: refs/heads/master
i:
  133859: 45d7336
v: v3
  • Loading branch information
Roel Kluin authored and David S. Miller committed Jan 21, 2009
1 parent 35e870e commit 7841c30
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9f4d26d0f3016cf8813977d624751b94465fa317
refs/heads/master: 57a574993d94671b495cdbe8aeb78b745abfe14f
13 changes: 9 additions & 4 deletions trunk/drivers/net/phy/mdio-gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,16 +200,21 @@ static int __devinit mdio_ofgpio_probe(struct of_device *ofdev,
{
struct device_node *np = NULL;
struct mdio_gpio_platform_data *pdata;
int ret;

pdata = kzalloc(sizeof(*pdata), GFP_KERNEL);
if (!pdata)
return -ENOMEM;

pdata->mdc = of_get_gpio(ofdev->node, 0);
pdata->mdio = of_get_gpio(ofdev->node, 1);

if (pdata->mdc < 0 || pdata->mdio < 0)
ret = of_get_gpio(ofdev->node, 0);
if (ret < 0)
goto out_free;
pdata->mdc = ret;

ret = of_get_gpio(ofdev->node, 1);
if (ret < 0)
goto out_free;
pdata->mdio = ret;

while ((np = of_get_next_child(ofdev->node, np)))
if (!strcmp(np->type, "ethernet-phy"))
Expand Down

0 comments on commit 7841c30

Please sign in to comment.