081-0003-USB-bcma-use-simpler-devm-helper-for-getting-vcc-GPI.patch 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. From 1507372b97a098fd51b92c4dbdbbcd65cba26939 Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
  3. Date: Wed, 23 Mar 2016 12:37:11 +0100
  4. Subject: [PATCH] USB: bcma: use simpler devm helper for getting vcc GPIO
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. Thanks to switching to devm_gpiod_get:
  9. 1) We don't have to pass fwnode pointer
  10. 2) We can request initial GPIO value at getting call
  11. This was successfully tested on Netgear R6250 (BCM4708).
  12. Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
  13. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  14. ---
  15. drivers/usb/host/bcma-hcd.c | 6 ++----
  16. 1 file changed, 2 insertions(+), 4 deletions(-)
  17. --- a/drivers/usb/host/bcma-hcd.c
  18. +++ b/drivers/usb/host/bcma-hcd.c
  19. @@ -352,10 +352,8 @@ static int bcma_hcd_probe(struct bcma_de
  20. usb_dev->core = core;
  21. if (core->dev.of_node)
  22. - usb_dev->gpio_desc = devm_get_gpiod_from_child(&core->dev, "vcc",
  23. - &core->dev.of_node->fwnode);
  24. - if (!IS_ERR_OR_NULL(usb_dev->gpio_desc))
  25. - gpiod_direction_output(usb_dev->gpio_desc, 1);
  26. + usb_dev->gpio_desc = devm_gpiod_get(&core->dev, "vcc",
  27. + GPIOD_OUT_HIGH);
  28. switch (core->id.id) {
  29. case BCMA_CORE_USB20_HOST: