diff options
author | Pawel Laszczak <pawell@cadence.com> | 2020-07-13 13:05:54 +0300 |
---|---|---|
committer | Felipe Balbi <balbi@kernel.org> | 2020-07-24 16:45:13 +0300 |
commit | b2aeb6da3d6ee562e57ad3a7d73a7de0c36ce8eb (patch) | |
tree | 87b811c90dfc29ca44b3c7f8ffdf0401c95ee7e1 /drivers/usb/cdns3/host.c | |
parent | f41ca26b8b178d0b7005c9bfeda88814179203b3 (diff) | |
download | linux-b2aeb6da3d6ee562e57ad3a7d73a7de0c36ce8eb.tar.xz |
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 <pawell@cadence.com>
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
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) |