diff options
author | Jisheng Zhang <Jisheng.Zhang@synaptics.com> | 2020-06-16 10:26:17 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-06-18 10:13:16 +0200 |
commit | 07d9878fa18f5283182f4c13e708e22c11016efe (patch) | |
tree | 51471b207f4713764045320b8183119f3a81fe35 /drivers/usb/dwc2/params.c | |
parent | drivers: usb: Fix trivial spelling (diff) | |
download | linux-07d9878fa18f5283182f4c13e708e22c11016efe.tar.xz linux-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 '')
-rw-r--r-- | drivers/usb/dwc2/params.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c index ce736d67c7c3..8f9d061c4d5f 100644 --- a/drivers/usb/dwc2/params.c +++ b/drivers/usb/dwc2/params.c @@ -68,14 +68,14 @@ static void dwc2_set_his_params(struct dwc2_hsotg *hsotg) p->ahbcfg = GAHBCFG_HBSTLEN_INCR16 << GAHBCFG_HBSTLEN_SHIFT; p->change_speed_quirk = true; - p->power_down = false; + p->power_down = DWC2_POWER_DOWN_PARAM_NONE; } static void dwc2_set_s3c6400_params(struct dwc2_hsotg *hsotg) { struct dwc2_core_params *p = &hsotg->params; - p->power_down = 0; + p->power_down = DWC2_POWER_DOWN_PARAM_NONE; p->phy_utmi_width = 8; } @@ -89,7 +89,7 @@ static void dwc2_set_rk_params(struct dwc2_hsotg *hsotg) p->host_perio_tx_fifo_size = 256; p->ahbcfg = GAHBCFG_HBSTLEN_INCR16 << GAHBCFG_HBSTLEN_SHIFT; - p->power_down = 0; + p->power_down = DWC2_POWER_DOWN_PARAM_NONE; } static void dwc2_set_ltq_params(struct dwc2_hsotg *hsotg) @@ -319,11 +319,11 @@ static void dwc2_set_param_power_down(struct dwc2_hsotg *hsotg) int val; if (hsotg->hw_params.hibernation) - val = 2; + val = DWC2_POWER_DOWN_PARAM_HIBERNATION; else if (hsotg->hw_params.power_optimized) - val = 1; + val = DWC2_POWER_DOWN_PARAM_PARTIAL; else - val = 0; + val = DWC2_POWER_DOWN_PARAM_NONE; hsotg->params.power_down = val; } |