]> git.karo-electronics.de Git - karo-tx-linux.git/commit
NFC: pn544: use flags argument of devm_gpiod_get to set direction
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tue, 19 May 2015 07:22:56 +0000 (09:22 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Mon, 8 Jun 2015 22:34:19 +0000 (00:34 +0200)
commit8a2151c587715e84af676ee6c210fd41b912de76
tree25e554acdb674a980351cfd7346ad2905834193b
parent0cd6f66739ac8a936d4660d45ecb99eb801709a4
NFC: pn544: use flags argument of devm_gpiod_get to set direction

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.

Use this to simplify the driver. Furthermore this is one caller less
that stops us making the flags argument to gpiod_get*() mandatory.

While touching this also do some minor coding style fixes.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/nfc/pn544/i2c.c