OSDN Git Service

iio: light: ltr501: Use devm_regulator_bulk_get_enable()
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 16 Oct 2022 16:34:05 +0000 (17:34 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 23 Nov 2022 19:44:02 +0000 (19:44 +0000)
commitc437c977c1d2116e0f3667de7222544f348032e4
treef7ffae85ad98d3ccc9658354b1349215a1b2e4b9
parent2c97f7b404b8610ebca645d60a6ed1e68d08fbe3
iio: light: ltr501: Use devm_regulator_bulk_get_enable()

This driver only turns the power for some regulators on at probe and off
via a custom devm_add_action_or_reset() callback. The new
devm_regulator_bulk_get_enable() replaces all this boilerplate code.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20221016163409.320197-11-jic23@kernel.org
drivers/iio/light/ltr501.c