Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
[pandora-kernel.git] / arch / arm / mach-at91 / at91sam9260_devices.c
index 3c2b580..24b6f8c 100644 (file)
@@ -61,9 +61,17 @@ static struct platform_device at91_usbh_device = {
 
 void __init at91_add_device_usbh(struct at91_usbh_data *data)
 {
+       int i;
+
        if (!data)
                return;
 
+       /* Enable overcurrent notification */
+       for (i = 0; i < data->ports; i++) {
+               if (data->overcurrent_pin[i])
+                       at91_set_gpio_input(data->overcurrent_pin[i], 1);
+       }
+
        usbh_data = *data;
        platform_device_register(&at91_usbh_device);
 }