kernel: update 3.14 to 3.14.18
[openwrt.git] / target / linux / brcm47xx / patches-3.14 / 128-MIPS-BCM47XX-Add-new-file-for-device-specific-workar.patch
index a1ebd20..ea15933 100644 (file)
@@ -34,7 +34,7 @@ V2: Drop pr_debug for devices we don't need workarounds for. It was too
  #endif
 --- a/arch/mips/bcm47xx/setup.c
 +++ b/arch/mips/bcm47xx/setup.c
-@@ -282,6 +282,7 @@ static int __init bcm47xx_register_bus_c
+@@ -286,6 +286,7 @@ static int __init bcm47xx_register_bus_c
        }
        bcm47xx_buttons_register();
        bcm47xx_leds_register();
@@ -44,7 +44,7 @@ V2: Drop pr_debug for devices we don't need workarounds for. It was too
        return 0;
 --- /dev/null
 +++ b/arch/mips/bcm47xx/workarounds.c
-@@ -0,0 +1,25 @@
+@@ -0,0 +1,31 @@
 +#include "bcm47xx_private.h"
 +
 +#include <linux/gpio.h>
@@ -53,8 +53,14 @@ V2: Drop pr_debug for devices we don't need workarounds for. It was too
 +
 +static void __init bcm47xx_workarounds_netgear_wnr3500l(void)
 +{
-+      /* Set GPIO 12 to 1 to pass power to the USB port */
-+      gpio_set_value(12, 1);
++      const int usb_power = 12;
++      int err;
++
++      err = gpio_request_one(usb_power, GPIOF_OUT_INIT_HIGH, "usb_power");
++      if (err)
++              pr_err("Failed to request USB power gpio: %d\n", err);
++      else
++              gpio_free(usb_power);
 +}
 +
 +void __init bcm47xx_workarounds(void)