Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 340656
b: refs/heads/master
c: dea0924
h: refs/heads/master
v: v3
  • Loading branch information
Jean-Christophe PLAGNIOL-VILLARD authored and David S. Miller committed Nov 6, 2012
1 parent 0e441ab commit b9e4ebc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 96f6360c5a0c20fd3e006c3030aac0d1addbe3d9
refs/heads/master: dea09247b46687ff6e46fc4b50988537d01c8e64
11 changes: 11 additions & 0 deletions trunk/drivers/net/ethernet/cadence/at91_ether.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/of_net.h>
#include <linux/pinctrl/consumer.h>

#include "macb.h"

Expand Down Expand Up @@ -501,11 +502,21 @@ static int __init at91ether_probe(struct platform_device *pdev)
struct phy_device *phydev;
struct macb *lp;
int res;
struct pinctrl *pinctrl;

regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!regs)
return -ENOENT;

pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
if (IS_ERR(pinctrl)) {
res = PTR_ERR(pinctrl);
if (res == -EPROBE_DEFER)
return res;

dev_warn(&pdev->dev, "No pinctrl provided\n");
}

dev = alloc_etherdev(sizeof(struct macb));
if (!dev)
return -ENOMEM;
Expand Down

0 comments on commit b9e4ebc

Please sign in to comment.