mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-10-16 22:39:48 +00:00
iio: ad5064: Fix regulator handling
commit 8911a43bc1 upstream.
The correct way to handle errors returned by regualtor_get() and friends is
to propagate the error since that means that an regulator was specified,
but something went wrong when requesting it.
For handling optional regulators, e.g. when the device has an internal
vref, regulator_get_optional() should be used to avoid getting the dummy
regulator that the regulator core otherwise provides.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
[bwh: Backported to 3.16: Keep using ad5064_write() instead of
ad5064_set_config().]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
This commit is contained in:
parent
faa9e0b2a1
commit
f9dbd14631
1 changed files with 39 additions and 16 deletions
Loading…
Add table
Add a link
Reference in a new issue