Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
SVN-Revision: 40344
}
--- /dev/null
+++ b/arch/mips/bcm47xx/workarounds.c
}
--- /dev/null
+++ b/arch/mips/bcm47xx/workarounds.c
+#include "bcm47xx_private.h"
+
+#include <linux/gpio.h>
+#include "bcm47xx_private.h"
+
+#include <linux/gpio.h>
+
+static void __init bcm47xx_workarounds_netgear_wnr3500l(void)
+{
+
+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)
+}
+
+void __init bcm47xx_workarounds(void)
return 0;
--- /dev/null
+++ b/arch/mips/bcm47xx/workarounds.c
return 0;
--- /dev/null
+++ b/arch/mips/bcm47xx/workarounds.c
+#include "bcm47xx_private.h"
+
+#include <linux/gpio.h>
+#include "bcm47xx_private.h"
+
+#include <linux/gpio.h>
+
+static void __init bcm47xx_workarounds_netgear_wnr3500l(void)
+{
+
+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)
+}
+
+void __init bcm47xx_workarounds(void)