From david-b@pacbell.net Tue Nov 25 13:33:45 2008 From: David Brownell Date: Mon, 24 Nov 2008 11:43:30 -0800 Subject: USB: gadget: pxa25x_udc vbus sense initialization To: linux-usb@vger.kernel.org Cc: Greg KH , jayakumar.lkml@gmail.com Message-ID: <200811241143.31154.david-b@pacbell.net> From: David Brownell Some code in the pxa25x_udc driver wrongly expects the value of is_vbus_present() to be 0/1, not zero/nonzero ... cope. Issue noted by Jaya Kumar This bug has been around since July 2007, and has a simple workaround: unplug the Linux gadget, then re-plug it. Signed-off-by: David Brownell Cc: Jaya Kumar Signed-off-by: Greg Kroah-Hartman --- drivers/usb/gadget/pxa25x_udc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/usb/gadget/pxa25x_udc.c +++ b/drivers/usb/gadget/pxa25x_udc.c @@ -2198,7 +2198,7 @@ static int __init pxa25x_udc_probe(struc udc_disable(dev); udc_reinit(dev); - dev->vbus = is_vbus_present(); + dev->vbus = !!is_vbus_present(); /* irq setup after old hardware state is cleaned up */ retval = request_irq(irq, pxa25x_udc_irq,