lantiq: fix bug in hcd gpio detetcion code
[lede-git/.git] / package / kernel / lantiq / ltq-hcd / src / ifxusb_driver.c
index 04346b972f0ab5b08b8ece318ead3ed646b96bb3..425b3a986e786917b9cc06a836eaaec4009ea620 100644 (file)
@@ -288,11 +288,11 @@ static int ifxusb_driver_remove(struct platform_device *_pdev)
                ifxusb_core_if_remove_d(&ifxusb_pcd.core_if );
        #endif
        /* Remove the device attributes */
-       #ifdef __IS_HOST__
+/*     #ifdef __IS_HOST__
                ifxusb_attr_remove_h(&_pdev->dev);
        #else
                ifxusb_attr_remove_d(&_pdev->dev);
-       #endif
+       #endif*/
        return 0;
 }
 
@@ -462,14 +462,14 @@ static int ifxusb_driver_probe(struct platform_device *_pdev)
                        goto ifxusb_driver_probe_fail;
        #endif
 
-       #ifdef __IS_HOST__
+/*     #ifdef __IS_HOST__
                ifxusb_attr_create_h(&_pdev->dev);
        #else
                ifxusb_attr_create_d(&_pdev->dev);
-       #endif
+       #endif*/
 
        gpio_count = of_gpio_count(np);
-       while (gpio_count) {
+       while (gpio_count > 0) {
                enum of_gpio_flags flags;
                int gpio = of_get_gpio_flags(np, --gpio_count, &flags);
                if (gpio_request(gpio, "usb"))