From: John Crispin Date: Wed, 18 Sep 2013 16:31:49 +0000 (+0000) Subject: lantiq: fix bug in hcd gpio detetcion code X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=commitdiff_plain;hb=790b37bf020d5f9c777ce0a33cdcade64b8325a3 lantiq: fix bug in hcd gpio detetcion code Signed-off-by: John Crispin SVN-Revision: 38043 --- diff --git a/package/kernel/lantiq/ltq-hcd/src/ifxusb_driver.c b/package/kernel/lantiq/ltq-hcd/src/ifxusb_driver.c index 97f282db6c..425b3a986e 100644 --- a/package/kernel/lantiq/ltq-hcd/src/ifxusb_driver.c +++ b/package/kernel/lantiq/ltq-hcd/src/ifxusb_driver.c @@ -469,7 +469,7 @@ static int ifxusb_driver_probe(struct platform_device *_pdev) #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"))