Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 266165
b: refs/heads/master
c: a9b2c8e
h: refs/heads/master
i:
  266163: b9b6bd1
v: v3
  • Loading branch information
Shawn Guo authored and David S. Miller committed Sep 23, 2011
1 parent e3cedde commit 84b3196
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 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: f04ea74e8aa5b95610bcd2fcb110ffa2ec665dcc
refs/heads/master: a9b2c8ef1585e1f14cec03777b1238e0d5ec4ea1
13 changes: 5 additions & 8 deletions trunk/drivers/net/ethernet/freescale/fec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1411,38 +1411,35 @@ static int __devinit fec_get_phy_mode_dt(struct platform_device *pdev)
return -ENODEV;
}

static int __devinit fec_reset_phy(struct platform_device *pdev)
static void __devinit fec_reset_phy(struct platform_device *pdev)
{
int err, phy_reset;
struct device_node *np = pdev->dev.of_node;

if (!np)
return -ENODEV;
return;

phy_reset = of_get_named_gpio(np, "phy-reset-gpios", 0);
err = gpio_request_one(phy_reset, GPIOF_OUT_INIT_LOW, "phy-reset");
if (err) {
pr_warn("FEC: failed to get gpio phy-reset: %d\n", err);
return err;
pr_debug("FEC: failed to get gpio phy-reset: %d\n", err);
return;
}
msleep(1);
gpio_set_value(phy_reset, 1);

return 0;
}
#else /* CONFIG_OF */
static inline int fec_get_phy_mode_dt(struct platform_device *pdev)
{
return -ENODEV;
}

static inline int fec_reset_phy(struct platform_device *pdev)
static inline void fec_reset_phy(struct platform_device *pdev)
{
/*
* In case of platform probe, the reset has been done
* by machine code.
*/
return 0;
}
#endif /* CONFIG_OF */

Expand Down

0 comments on commit 84b3196

Please sign in to comment.