diff options
author | Fabio Estevam <fabio.estevam@freescale.com> | 2014-11-26 13:44:25 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-11-26 09:28:11 -0800 |
commit | 8d1dc4d055faafafca3edd8499aeeef3f77803e4 (patch) | |
tree | 01f1ca3a15e427c7520e3e72b23b6b45dcd5ce51 /drivers/usb | |
parent | 73529828cf896df5017255136b4dc2386dff0850 (diff) |
usb: chipidea: usbmisc_imx: Move the reading of USB_PHY_CTRL
If 'evdo' property is not defined, then reading the MX25_USB_PHY_CTRL_OFFSET
register is an unneeded operation.
Move the reading of MX25_USB_PHY_CTRL_OFFSET inside the 'evdo' if block code,
where it is actually used.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/chipidea/usbmisc_imx.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/chipidea/usbmisc_imx.c b/drivers/usb/chipidea/usbmisc_imx.c index 926c997ef310..29200ebdd357 100644 --- a/drivers/usb/chipidea/usbmisc_imx.c +++ b/drivers/usb/chipidea/usbmisc_imx.c @@ -117,10 +117,9 @@ static int usbmisc_imx25_post(struct imx_usbmisc_data *data) if (data->index > 2) return -EINVAL; - reg = usbmisc->base + MX25_USB_PHY_CTRL_OFFSET; - if (data->evdo) { spin_lock_irqsave(&usbmisc->lock, flags); + reg = usbmisc->base + MX25_USB_PHY_CTRL_OFFSET; val = readl(reg); writel(val | MX25_BM_EXTERNAL_VBUS_DIVIDER, reg); spin_unlock_irqrestore(&usbmisc->lock, flags); |