lantiq: fix bug in hcd gpio detetcion code

Signed-off-by: John Crispin <blogic@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38043 3c298f89-4303-0410-b956-a3cf2f4a3e73
master
John Crispin 2013-09-18 16:31:49 +00:00
parent 9921bd78e7
commit 55556c8ae8
1 changed files with 1 additions and 1 deletions

View File

@ -469,7 +469,7 @@ static int ifxusb_driver_probe(struct platform_device *_pdev)
#endif*/ #endif*/
gpio_count = of_gpio_count(np); gpio_count = of_gpio_count(np);
while (gpio_count) { while (gpio_count > 0) {
enum of_gpio_flags flags; enum of_gpio_flags flags;
int gpio = of_get_gpio_flags(np, --gpio_count, &flags); int gpio = of_get_gpio_flags(np, --gpio_count, &flags);
if (gpio_request(gpio, "usb")) if (gpio_request(gpio, "usb"))