Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 340589
b: refs/heads/master
c: 8ef29f8
h: refs/heads/master
i:
  340587: 94a7697
v: v3
  • Loading branch information
Jean-Christophe PLAGNIOL-VILLARD authored and David S. Miller committed Nov 1, 2012
1 parent b660267 commit aeca8da
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: 29bc2e1e5504627c08ae2ce298e2209701289c40
refs/heads/master: 8ef29f8aae524bd51298fb10ac6a5ce6c4c5a3d8
11 changes: 11 additions & 0 deletions trunk/drivers/net/ethernet/cadence/macb.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,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 @@ -1472,13 +1473,23 @@ static int __init macb_probe(struct platform_device *pdev)
struct phy_device *phydev;
u32 config;
int err = -ENXIO;
struct pinctrl *pinctrl;

regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!regs) {
dev_err(&pdev->dev, "no mmio resource defined\n");
goto err_out;
}

pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
if (IS_ERR(pinctrl)) {
err = PTR_ERR(pinctrl);
if (err == -EPROBE_DEFER)
goto err_out;

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

err = -ENOMEM;
dev = alloc_etherdev(sizeof(*bp));
if (!dev)
Expand Down

0 comments on commit aeca8da

Please sign in to comment.