net: stmmac: make reset control an optional requirement
Subsystems (5)
PATCH v2 1/1 net: stmmac: make reset control an optional requirement
From: Dinh Nguyen <[email protected]>
Not having a reset control line to the ethernet controller should not be a hard failure. Instead, add support for deferred probing and just print out a debug statement.
Signed-off-by Dinh Nguyen <[email protected]>
Cc Vince Bridgers <[email protected]>
CC David S. Miller <[email protected]>
---
v2: return EPROBE_DEFER directly as 'ret' is not used as return variable
--- drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c +3 -1
@@ -89,7 +89,9 @@ static int socfpga_dwmac_parse_data(struct socfpga_dwmac *dwmac, struct device * STMMAC_RESOURCE_NAME);if (IS_ERR (dwmac->stmmac_rst)) {dev_info (dev,"Could not get reset control!\n" ); -return -EINVAL ; +if (PTR_ERR (dwmac->stmmac_rst) == -EPROBE_DEFER ) +return -EPROBE_DEFER ; + dwmac->stmmac_rst =NULL ; } dwmac->interface =of_get_phy_mode (np);
Signature · 1 line
2.2.1
From: <[email protected]>
Date: Fri, 6 Mar 2015 17:48:28 -0600
Quoted 7 lines
From: Dinh Nguyen <[email protected]>
Not having a reset control line to the ethernet controller should not be a hard failure. Instead, add support for deferred probing and just print out a debug statement.
Signed-off-by Dinh Nguyen <[email protected]>
Applied, thanks.