usb: dwc3: pci: make better use of gpiod API
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Mon, 6 Jul 2015 09:09:48 +0000 (11:09 +0200)
committerFelipe Balbi <balbi@ti.com>
Wed, 29 Jul 2015 14:59:18 +0000 (09:59 -0500)
commit2df033ca39b56605725384bac1579cdd30e052a6
tree25a9035e4cbf6c2fc7867b7217396fdefc14b6e1
parent83b7b67c780500a1d5d87c44ee8963166154adfa
usb: dwc3: pci: make better use of gpiod API

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 additional parameter and the _optional variant to simplify the
driver and improve error handling. Also expand the comment to explain
why it's not sensible to switch to devm_gpiod_get and why the gpiod_put
is also necessary.

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

Tested-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/dwc3/dwc3-pci.c
This page took 0.025478 seconds and 5 git commands to generate.