usb: cdns3: core: removed 'goto not_otg'
Patch removes 'goto not_otg' instruction from cdns3_hw_role_state_machine function. Signed-off-by: Pawel Laszczak <pawell@cadence.com> Signed-off-by: Felipe Balbi <balbi@kernel.org>
This commit is contained in:
parent
08c35dd3cc
commit
5c2cf30f14
@ -191,11 +191,17 @@ err:
|
|||||||
*/
|
*/
|
||||||
static enum usb_role cdns3_hw_role_state_machine(struct cdns3 *cdns)
|
static enum usb_role cdns3_hw_role_state_machine(struct cdns3 *cdns)
|
||||||
{
|
{
|
||||||
enum usb_role role;
|
enum usb_role role = USB_ROLE_NONE;
|
||||||
int id, vbus;
|
int id, vbus;
|
||||||
|
|
||||||
if (cdns->dr_mode != USB_DR_MODE_OTG)
|
if (cdns->dr_mode != USB_DR_MODE_OTG) {
|
||||||
goto not_otg;
|
if (cdns3_is_host(cdns))
|
||||||
|
role = USB_ROLE_HOST;
|
||||||
|
if (cdns3_is_device(cdns))
|
||||||
|
role = USB_ROLE_DEVICE;
|
||||||
|
|
||||||
|
return role;
|
||||||
|
}
|
||||||
|
|
||||||
id = cdns3_get_id(cdns);
|
id = cdns3_get_id(cdns);
|
||||||
vbus = cdns3_get_vbus(cdns);
|
vbus = cdns3_get_vbus(cdns);
|
||||||
@ -232,14 +238,6 @@ static enum usb_role cdns3_hw_role_state_machine(struct cdns3 *cdns)
|
|||||||
dev_dbg(cdns->dev, "role %d -> %d\n", cdns->role, role);
|
dev_dbg(cdns->dev, "role %d -> %d\n", cdns->role, role);
|
||||||
|
|
||||||
return role;
|
return role;
|
||||||
|
|
||||||
not_otg:
|
|
||||||
if (cdns3_is_host(cdns))
|
|
||||||
role = USB_ROLE_HOST;
|
|
||||||
if (cdns3_is_device(cdns))
|
|
||||||
role = USB_ROLE_DEVICE;
|
|
||||||
|
|
||||||
return role;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int cdns3_idle_role_start(struct cdns3 *cdns)
|
static int cdns3_idle_role_start(struct cdns3 *cdns)
|
||||||
|
Loading…
Reference in New Issue
Block a user