If the regulator cannot be registered because its supplier is not available yet, don't write an error. There is no need to alert the user of probe deferrals. This fixes a storm of error messages at boot when a GPIO controlled regulator is supplied by an I2C controlled supply.
Signed-off-by: Mike Looijmans <[email protected]> --- drivers/regulator/fixed.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c index d21da27..ac7c874 100644 --- a/drivers/regulator/fixed.c +++ b/drivers/regulator/fixed.c @@ -189,7 +189,9 @@ static int reg_fixed_voltage_probe(struct platform_device *pdev) &cfg); if (IS_ERR(drvdata->dev)) { ret = PTR_ERR(drvdata->dev); - dev_err(&pdev->dev, "Failed to register regulator: %d\n", ret); + if (ret != -EPROBE_DEFER) + dev_err(&pdev->dev, + "Failed to register regulator: %d\n", ret); return ret; } -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

