From: Fabio Estevam Date: Wed, 26 Nov 2014 05:44:25 +0000 (+0800) Subject: usb: chipidea: usbmisc_imx: Move the reading of USB_PHY_CTRL X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8d1dc4d055faafafca3edd8499aeeef3f77803e4;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Peter Chen Signed-off-by: Greg Kroah-Hartman --- 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);