]> git.baikalelectronics.ru Git - kernel.git/commit
regulator: rk808: make better use of the gpiod API
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tue, 21 Jul 2015 14:46:25 +0000 (16:46 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 21 Jul 2015 16:11:30 +0000 (17:11 +0100)
commitd55362a462d8c952581b5c08300833d55035658f
treeadcbcdbe370fd416c04519a2c5e0055cc4fb35c8
parent744fc66ea9a8362a603c91bb9d27f21b254c61a5
regulator: rk808: make better use of the gpiod API

The gpiod functions include variants for managed gpiod resources. Use it
to simplify the remove function.

As the driver handles a device node without a specification of dvs gpios
just fine, additionally use the variant of gpiod_get exactly for this
use case. This makes error checking more strict.

As a third benefit this patch makes the driver use the flags parameter
of gpiod_get* which will not be optional any more after 4.2 and so
prevents a build failure when the respective gpiod commit is merged.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/rk808-regulator.c