Commit 2de8c023 authored by Dmitry Osipenko's avatar Dmitry Osipenko Committed by Jonathan Cameron

iio: magnetometer: ak8974: Silence deferred-probe error

It's not uncommon that voltage regulator becomes available later during
kernel's boot process. This patch adds info message about unavailable
regulators in a case of the deferred-probe error and also amends the
error message with a error code.
Signed-off-by: default avatarDmitry Osipenko <digetx@gmail.com>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent aa8cb048
...@@ -746,7 +746,12 @@ static int ak8974_probe(struct i2c_client *i2c, ...@@ -746,7 +746,12 @@ static int ak8974_probe(struct i2c_client *i2c,
ARRAY_SIZE(ak8974->regs), ARRAY_SIZE(ak8974->regs),
ak8974->regs); ak8974->regs);
if (ret < 0) { if (ret < 0) {
dev_err(&i2c->dev, "cannot get regulators\n"); if (ret != -EPROBE_DEFER)
dev_err(&i2c->dev, "cannot get regulators: %d\n", ret);
else
dev_dbg(&i2c->dev,
"regulators unavailable, deferring probe\n");
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment