浏览代码

regulator: gpio: don't print error on EPROBE_DEFER

Don't print out an error with the driver sees EPROBE_DEFER when
attempting to get the gpio.  These errors are usually transient; the
probe will be retried later.

Signed-off-by: Rabin Vincent <rabin.vincent@axis.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Rabin Vincent 9 年之前
父节点
当前提交
0258382bf3
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      drivers/regulator/gpio-regulator.c

+ 4 - 2
drivers/regulator/gpio-regulator.c

@@ -283,8 +283,10 @@ static int gpio_regulator_probe(struct platform_device *pdev)
 		drvdata->nr_gpios = config->nr_gpios;
 		drvdata->nr_gpios = config->nr_gpios;
 		ret = gpio_request_array(drvdata->gpios, drvdata->nr_gpios);
 		ret = gpio_request_array(drvdata->gpios, drvdata->nr_gpios);
 		if (ret) {
 		if (ret) {
-			dev_err(&pdev->dev,
-			"Could not obtain regulator setting GPIOs: %d\n", ret);
+			if (ret != -EPROBE_DEFER)
+				dev_err(&pdev->dev,
+					"Could not obtain regulator setting GPIOs: %d\n",
+					ret);
 			goto err_memstate;
 			goto err_memstate;
 		}
 		}
 	}
 	}