diff options
author | Jisheng Zhang <Jisheng.Zhang@synaptics.com> | 2020-06-16 16:26:17 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-06-18 10:13:16 +0200 |
commit | 07d9878fa18f5283182f4c13e708e22c11016efe (patch) | |
tree | 51471b207f4713764045320b8183119f3a81fe35 /drivers/usb/dwc2/hcd.c | |
parent | 9f3aedbe98fe5afaf68b74cc1b242eca77fe3119 (diff) | |
download | lwn-07d9878fa18f5283182f4c13e708e22c11016efe.tar.gz lwn-07d9878fa18f5283182f4c13e708e22c11016efe.zip |
usb: dwc2: use well defined macros for power_down
Use the well defined macros such as DWC2_POWER_DOWN_PARAM_NONE,
DWC2_POWER_DOWN_PARAM_PARTIAL and DWC2_POWER_DOWN_PARAM_HIBERNATION
to make code more readable.
Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Acked-by: Minas Harutyunyan <hminas@synopsys.com>
Link: https://lore.kernel.org/r/20200616162617.38365cc8@xhacker.debian
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/dwc2/hcd.c')
-rw-r--r-- | drivers/usb/dwc2/hcd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c index b90f858af960..e9ac215b9663 100644 --- a/drivers/usb/dwc2/hcd.c +++ b/drivers/usb/dwc2/hcd.c @@ -3628,7 +3628,7 @@ static int dwc2_hcd_hub_control(struct dwc2_hsotg *hsotg, u16 typereq, "SetPortFeature - USB_PORT_FEAT_SUSPEND\n"); if (windex != hsotg->otg_port) goto error; - if (hsotg->params.power_down == 2) + if (hsotg->params.power_down == DWC2_POWER_DOWN_PARAM_HIBERNATION) dwc2_enter_hibernation(hsotg, 1); else dwc2_port_suspend(hsotg, windex); @@ -3646,7 +3646,7 @@ static int dwc2_hcd_hub_control(struct dwc2_hsotg *hsotg, u16 typereq, break; case USB_PORT_FEAT_RESET: - if (hsotg->params.power_down == 2 && + if (hsotg->params.power_down == DWC2_POWER_DOWN_PARAM_HIBERNATION && hsotg->hibernated) dwc2_exit_hibernation(hsotg, 0, 1, 1); hprt0 = dwc2_read_hprt0(hsotg); |