• Uwe Kleine-König's avatar
    regulator: rk808: make better use of the gpiod API · a13eaf02
    Uwe Kleine-König authored
    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: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
    Signed-off-by: default avatarMark Brown <broonie@kernel.org>
    a13eaf02
rk808-regulator.c 17.5 KB