diff options
author | David Brownell <dbrownell@users.sourceforge.net> | 2008-11-24 11:43:30 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-01-07 10:00:02 -0800 |
commit | b40fc2a2563b03a7b925cd16d1657aa2c24fd9c0 (patch) | |
tree | 27494169c2b22d457fc5bc359fd8108d40440173 /drivers/usb/gadget | |
parent | c48a5155252fd9cba7bedc59e5f8a339a3454d58 (diff) | |
download | op-kernel-dev-b40fc2a2563b03a7b925cd16d1657aa2c24fd9c0.zip op-kernel-dev-b40fc2a2563b03a7b925cd16d1657aa2c24fd9c0.tar.gz |
USB: gadget: pxa25x_udc vbus sense initialization
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 <jayakumar.lkml@gmail.com>
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 <dbrownell@users.sourceforge.net>
Cc: Jaya Kumar <jayakumar.lkml@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r-- | drivers/usb/gadget/pxa25x_udc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/pxa25x_udc.c b/drivers/usb/gadget/pxa25x_udc.c index 697a0ca..9b36205 100644 --- a/drivers/usb/gadget/pxa25x_udc.c +++ b/drivers/usb/gadget/pxa25x_udc.c @@ -2198,7 +2198,7 @@ static int __init pxa25x_udc_probe(struct platform_device *pdev) 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, |