From: Dinh Nguyen Date: Fri, 6 Mar 2015 23:48:28 +0000 (-0600) Subject: net: stmmac: make reset control an optional requirement X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cbe21d92e4d501e4895ef668b43fd8998c9b3b02;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git net: stmmac: make reset control an optional requirement 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 Cc: Vince Bridgers CC: David S. Miller Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c index e97074cd5800..5a36bd2c7837 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c @@ -91,7 +91,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);