mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-03 07:38:10 +00:00
leds: lp50xx: Don't spam logs when probe is deferred
When requesting GPIO line the probe can be deferred. In such case don't spam logs with an error message. This can be achieved by switching to dev_err_probe(). Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
This commit is contained in:
parent
1b40faf7e4
commit
9a10def9ce
1 changed files with 3 additions and 6 deletions
|
@ -455,12 +455,9 @@ static int lp50xx_probe_dt(struct lp50xx *priv)
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
priv->enable_gpio = devm_gpiod_get_optional(priv->dev, "enable", GPIOD_OUT_LOW);
|
priv->enable_gpio = devm_gpiod_get_optional(priv->dev, "enable", GPIOD_OUT_LOW);
|
||||||
if (IS_ERR(priv->enable_gpio)) {
|
if (IS_ERR(priv->enable_gpio))
|
||||||
ret = PTR_ERR(priv->enable_gpio);
|
return dev_err_probe(priv->dev, PTR_ERR(priv->enable_gpio),
|
||||||
dev_err(&priv->client->dev, "Failed to get enable gpio: %d\n",
|
"Failed to get enable GPIO\n");
|
||||||
ret);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
priv->regulator = devm_regulator_get(priv->dev, "vled");
|
priv->regulator = devm_regulator_get(priv->dev, "vled");
|
||||||
if (IS_ERR(priv->regulator))
|
if (IS_ERR(priv->regulator))
|
||||||
|
|
Loading…
Reference in a new issue