]> git.baikalelectronics.ru Git - kernel.git/commit
proximity: vl53l0x: Make VDD regulator actually optional
authorLuca Weiss <luca.weiss@fairphone.com>
Tue, 14 Jun 2022 11:20:50 +0000 (13:20 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 18 Jun 2022 16:55:17 +0000 (17:55 +0100)
commitfffd7124fd20c4c13c551ae8d646acb361194843
tree68617113b170d192832003442ef6e457b05067c4
parent69bae58a83f907b640b25e0cff93a4ca52cae24d
proximity: vl53l0x: Make VDD regulator actually optional

Contrary to what the naming might suggest, devm_regulator_get_optional
returns -ENODEV in case the regulator is not found which will trigger
probe error in this driver.

Use devm_regulator_get instead which will return a dummy regulator that
we can just use as if it was a proper regulator.

Fixes: 7ff2e3be9c3e ("proximity: vl53l0x: Handle the VDD regulator")
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Link: https://lore.kernel.org/r/20220614112049.302278-1-luca.weiss@fairphone.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/proximity/vl53l0x-i2c.c