Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'fixes-for-v3.15-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus

Felipe writes:

usb: fixes for v3.15-rc4

Small pull request this time containing only 3 patches.

One patch is fixing at91 resource retrieval, one fixes a
conditional in the generic OTG FSM and another fixes a
state transition also on our generic OTG FSM.

Signed-of-by: Felipe Balbi <balbi@ti.com>

+5 -14
-10
drivers/usb/gadget/at91_udc.c
··· 1709 1709 return -ENODEV; 1710 1710 } 1711 1711 1712 - if (pdev->num_resources != 2) { 1713 - DBG("invalid num_resources\n"); 1714 - return -ENODEV; 1715 - } 1716 - if ((pdev->resource[0].flags != IORESOURCE_MEM) 1717 - || (pdev->resource[1].flags != IORESOURCE_IRQ)) { 1718 - DBG("invalid resource type\n"); 1719 - return -ENODEV; 1720 - } 1721 - 1722 1712 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 1723 1713 if (!res) 1724 1714 return -ENXIO;
+5 -4
drivers/usb/phy/phy-fsm-usb.c
··· 303 303 otg_set_state(fsm, OTG_STATE_A_WAIT_VRISE); 304 304 break; 305 305 case OTG_STATE_A_WAIT_VRISE: 306 - if (fsm->id || fsm->a_bus_drop || fsm->a_vbus_vld || 307 - fsm->a_wait_vrise_tmout) { 306 + if (fsm->a_vbus_vld) 308 307 otg_set_state(fsm, OTG_STATE_A_WAIT_BCON); 309 - } 308 + else if (fsm->id || fsm->a_bus_drop || 309 + fsm->a_wait_vrise_tmout) 310 + otg_set_state(fsm, OTG_STATE_A_WAIT_VFALL); 310 311 break; 311 312 case OTG_STATE_A_WAIT_BCON: 312 313 if (!fsm->a_vbus_vld) 313 314 otg_set_state(fsm, OTG_STATE_A_VBUS_ERR); 314 315 else if (fsm->b_conn) 315 316 otg_set_state(fsm, OTG_STATE_A_HOST); 316 - else if (fsm->id | fsm->a_bus_drop | fsm->a_wait_bcon_tmout) 317 + else if (fsm->id || fsm->a_bus_drop || fsm->a_wait_bcon_tmout) 317 318 otg_set_state(fsm, OTG_STATE_A_WAIT_VFALL); 318 319 break; 319 320 case OTG_STATE_A_HOST: