diff options
| author | Pawel Laszczak <[email protected]> | 2020-07-13 10:05:54 +0000 |
|---|---|---|
| committer | Felipe Balbi <[email protected]> | 2020-07-24 13:45:13 +0000 |
| commit | b2aeb6da3d6ee562e57ad3a7d73a7de0c36ce8eb (patch) | |
| tree | 87b811c90dfc29ca44b3c7f8ffdf0401c95ee7e1 /drivers/usb/cdns3/host.c | |
| parent | usb: cdns3: core: removed overwriting some error code (diff) | |
| download | kernel-b2aeb6da3d6ee562e57ad3a7d73a7de0c36ce8eb.tar.gz kernel-b2aeb6da3d6ee562e57ad3a7d73a7de0c36ce8eb.zip | |
usb: cdns3: drd: simplify *switch_gadet and *switch_host
Patch split function cdns3_drd_switch_gadget and
cdns3_drd_switch_host into:
- cdns3_drd_host_on
- cdns3_drd_host_off
- cdns3_drd_gadget_on
- cdns3_drd_gadgett_off
These functions don't have any shared code so it's better to
have smaller, faster and easier functions.
Signed-off-by: Pawel Laszczak <[email protected]>
Reviewed-by: Peter Chen <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Diffstat (limited to 'drivers/usb/cdns3/host.c')
| -rw-r--r-- | drivers/usb/cdns3/host.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/cdns3/host.c b/drivers/usb/cdns3/host.c index ad788bf3fe4f..36c63d9ecd37 100644 --- a/drivers/usb/cdns3/host.c +++ b/drivers/usb/cdns3/host.c @@ -19,7 +19,7 @@ static int __cdns3_host_init(struct cdns3 *cdns) struct platform_device *xhci; int ret; - cdns3_drd_switch_host(cdns, 1); + cdns3_drd_host_on(cdns); xhci = platform_device_alloc("xhci-hcd", PLATFORM_DEVID_AUTO); if (!xhci) { @@ -53,7 +53,7 @@ static void cdns3_host_exit(struct cdns3 *cdns) { platform_device_unregister(cdns->host_dev); cdns->host_dev = NULL; - cdns3_drd_switch_host(cdns, 0); + cdns3_drd_host_off(cdns); } int cdns3_host_init(struct cdns3 *cdns) |
