From david-b@pacbell.net Wed Aug 1 15:34:15 2007 From: David Brownell To: Greg KH Subject: USB: px2xx_udc bugfix, missing check for gpio_pullup Date: Wed, 1 Aug 2007 12:45:36 -0700 Cc: Uli Luckas Message-Id: <200708011245.36218.david-b@pacbell.net> git commit b2bbb20b37d734443d1c279d0033a64f6095db54 added direct support for PXA GPIO D+ pullup as alternative to the older udc_command ops method. This was done by introduction of the pxa2xx_udc_mach_info member "gpio_pullup" which, if initialized, is now used in (almost) all places where udc_command used to be called. This patch fixes two places where checks for availability of D+ pullup control still only honor udc_command. Signed-off-by: Uli Luckas Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman --- drivers/usb/gadget/pxa2xx_udc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/usb/gadget/pxa2xx_udc.c +++ b/drivers/usb/gadget/pxa2xx_udc.c @@ -967,7 +967,7 @@ static int pxa2xx_udc_pullup(struct usb_ udc = container_of(_gadget, struct pxa2xx_udc, gadget); /* not all boards support pullup control */ - if (!udc->mach->udc_command) + if (!udc->mach->gpio_pullup && !udc->mach->udc_command) return -EOPNOTSUPP; is_active = (is_active != 0); @@ -2309,7 +2309,7 @@ static int pxa2xx_udc_suspend(struct pla { struct pxa2xx_udc *udc = platform_get_drvdata(dev); - if (!udc->mach->udc_command) + if (!udc->mach->gpio_pullup && !udc->mach->udc_command) WARN("USB host won't detect disconnect!\n"); pullup(udc, 0);