diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2015-03-02 00:25:47 +0300 |
---|---|---|
committer | Bryan Wu <cooloney@gmail.com> | 2015-03-03 00:29:33 +0300 |
commit | eb2294c3432fb6366ec12b56a3b2a12cf4242b69 (patch) | |
tree | a7469f2814b60525e58088990fa4329fc31b7812 /Documentation/driver-model | |
parent | 0cd1b0c3adaac2f9e8b5d2e739bf63a42fbf7ff2 (diff) | |
download | linux-eb2294c3432fb6366ec12b56a3b2a12cf4242b69.tar.xz |
leds: lp8860: make use of devm_gpiod_get_optional
The probe function open coded a bad variant of devm_gpiod_get_optional
using devm_gpiod_get and just ignoring all errors.
In contrast to that devm_gpiod_get_optional returns NULL if there was no
corresponding gpio specified in the device tree (or ACPI table) and
fails if there is an error (or GPIOLIB is not enabled).
Moreover since 39b2bbe3d715 (gpio: add flags argument to gpiod_get*()
functions) which appeared in v3.17-rc1, the gpiod_get* functions take an
additional parameter that allows to specify direction and initial value
for output which allows some simplification.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
Diffstat (limited to 'Documentation/driver-model')
0 files changed, 0 insertions, 0 deletions