diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2016-03-23 12:37:11 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-04-26 16:11:22 -0700 |
commit | 1507372b97a098fd51b92c4dbdbbcd65cba26939 (patch) | |
tree | 5ec5d2b088ef6018e711c11ca88a561f90ea8ad0 /drivers/usb/host | |
parent | c06fac7fa0a09a791b01f2cd963cbacdc878d69f (diff) | |
download | op-kernel-dev-1507372b97a098fd51b92c4dbdbbcd65cba26939.zip op-kernel-dev-1507372b97a098fd51b92c4dbdbbcd65cba26939.tar.gz |
USB: bcma: use simpler devm helper for getting vcc GPIO
Thanks to switching to devm_gpiod_get:
1) We don't have to pass fwnode pointer
2) We can request initial GPIO value at getting call
This was successfully tested on Netgear R6250 (BCM4708).
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r-- | drivers/usb/host/bcma-hcd.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/usb/host/bcma-hcd.c b/drivers/usb/host/bcma-hcd.c index 963e2d0..172ef17 100644 --- a/drivers/usb/host/bcma-hcd.c +++ b/drivers/usb/host/bcma-hcd.c @@ -352,10 +352,8 @@ static int bcma_hcd_probe(struct bcma_device *core) usb_dev->core = core; if (core->dev.of_node) - usb_dev->gpio_desc = devm_get_gpiod_from_child(&core->dev, "vcc", - &core->dev.of_node->fwnode); - if (!IS_ERR_OR_NULL(usb_dev->gpio_desc)) - gpiod_direction_output(usb_dev->gpio_desc, 1); + usb_dev->gpio_desc = devm_gpiod_get(&core->dev, "vcc", + GPIOD_OUT_HIGH); switch (core->id.id) { case BCMA_CORE_USB20_HOST: |