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)
commita13eaf02e2d6326a59f142db329faf4efb527e79
treeadcbcdbe370fd416c04519a2c5e0055cc4fb35c8
parent604d4994277f3526c8ec7ba16f32e236d5ca3e78
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
This page took 0.026036 seconds and 5 git commands to generate.