[lantiq]
authorblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 13 Feb 2011 16:01:07 +0000 (16:01 +0000)
committerblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 13 Feb 2011 16:01:07 +0000 (16:01 +0000)
* fixes dwc_otg init when power gpio is set to -1

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@25521 3c298f89-4303-0410-b956-a3cf2f4a3e73

target/linux/lantiq/patches/700-dwc_otg.patch

index 7193155..f663062 100644 (file)
 +static int __devinit
 +dwc_otg_driver_probe(struct platform_device *_dev)
 +{
-+    int retval = 0;
-+    dwc_otg_device_t *dwc_otg_device;
-+    int32_t   snpsid;
++      int retval = 0;
++      dwc_otg_device_t *dwc_otg_device;
++      int pin = (int)_dev->dev.platform_data;
++      int32_t snpsid;
 +      struct resource *res;
 +      gusbcfg_data_t usbcfg = {.d32 = 0};
 +
 +      // GPIOs
-+      if(_dev->dev.platform_data >= 0)
++      if(pin >= 0)
 +      {
-+              int pin = (int)_dev->dev.platform_data;
 +              gpio_request(pin, "usb_power");
 +              gpio_direction_output(pin, 1);
 +              gpio_set_value(pin, 1);