diff options
author | Neil Zhang <zhangwm@marvell.com> | 2011-11-29 20:57:17 -0500 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2011-12-12 04:45:25 -0500 |
commit | 2bcb75144027fcee878319de87a967a4dec49403 (patch) | |
tree | 252fb021cfb3d80b88c77c7618670878e42a6aaf /drivers/usb/gadget | |
parent | 5076ae5588e53da32fef697f604fec33fe5fada0 (diff) |
usb: gadget: mv_udc: replace some debug info
replace some debug info, make it easy to use.
Signed-off-by: Neil Zhang <zhangwm@marvell.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r-- | drivers/usb/gadget/mv_udc_core.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/usb/gadget/mv_udc_core.c b/drivers/usb/gadget/mv_udc_core.c index 143925c6a18..b229edeb2bb 100644 --- a/drivers/usb/gadget/mv_udc_core.c +++ b/drivers/usb/gadget/mv_udc_core.c | |||
@@ -1230,10 +1230,11 @@ static int mv_udc_vbus_session(struct usb_gadget *gadget, int is_active) | |||
1230 | udc = container_of(gadget, struct mv_udc, gadget); | 1230 | udc = container_of(gadget, struct mv_udc, gadget); |
1231 | spin_lock_irqsave(&udc->lock, flags); | 1231 | spin_lock_irqsave(&udc->lock, flags); |
1232 | 1232 | ||
1233 | udc->vbus_active = (is_active != 0); | ||
1234 | |||
1233 | dev_dbg(&udc->dev->dev, "%s: softconnect %d, vbus_active %d\n", | 1235 | dev_dbg(&udc->dev->dev, "%s: softconnect %d, vbus_active %d\n", |
1234 | __func__, udc->softconnect, udc->vbus_active); | 1236 | __func__, udc->softconnect, udc->vbus_active); |
1235 | 1237 | ||
1236 | udc->vbus_active = (is_active != 0); | ||
1237 | if (udc->driver && udc->softconnect && udc->vbus_active) { | 1238 | if (udc->driver && udc->softconnect && udc->vbus_active) { |
1238 | retval = mv_udc_enable(udc); | 1239 | retval = mv_udc_enable(udc); |
1239 | if (retval == 0) { | 1240 | if (retval == 0) { |
@@ -1262,10 +1263,11 @@ static int mv_udc_pullup(struct usb_gadget *gadget, int is_on) | |||
1262 | udc = container_of(gadget, struct mv_udc, gadget); | 1263 | udc = container_of(gadget, struct mv_udc, gadget); |
1263 | spin_lock_irqsave(&udc->lock, flags); | 1264 | spin_lock_irqsave(&udc->lock, flags); |
1264 | 1265 | ||
1266 | udc->softconnect = (is_on != 0); | ||
1267 | |||
1265 | dev_dbg(&udc->dev->dev, "%s: softconnect %d, vbus_active %d\n", | 1268 | dev_dbg(&udc->dev->dev, "%s: softconnect %d, vbus_active %d\n", |
1266 | __func__, udc->softconnect, udc->vbus_active); | 1269 | __func__, udc->softconnect, udc->vbus_active); |
1267 | 1270 | ||
1268 | udc->softconnect = (is_on != 0); | ||
1269 | if (udc->driver && udc->softconnect && udc->vbus_active) { | 1271 | if (udc->driver && udc->softconnect && udc->vbus_active) { |
1270 | retval = mv_udc_enable(udc); | 1272 | retval = mv_udc_enable(udc); |
1271 | if (retval == 0) { | 1273 | if (retval == 0) { |