Re: [RFC PATCH 3/3] usb: chipidea: usbmisc: small clean up

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jan 13, 2018 at 04:41:48PM +0100, Michael Trimarchi wrote:
> The register write can be done outside the if and else condition
> 
> Signed-off-by: Michael Trimarchi <michael@xxxxxxxxxxxxxxxxxxxx>
> ---
>  drivers/usb/chipidea/usbmisc_imx.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/chipidea/usbmisc_imx.c b/drivers/usb/chipidea/usbmisc_imx.c
> index 1f47ef6..34ad5bf 100644
> --- a/drivers/usb/chipidea/usbmisc_imx.c
> +++ b/drivers/usb/chipidea/usbmisc_imx.c
> @@ -315,13 +315,12 @@ static int usbmisc_imx6q_set_wakeup
>  	val = readl(usbmisc->base + data->index * 4);
>  	if (enabled) {
>  		val |= wakeup_setting;
> -		writel(val, usbmisc->base + data->index * 4);
>  	} else {
>  		if (val & MX6_BM_WAKEUP_INTR)
>  			pr_debug("wakeup int at ci_hdrc.%d\n", data->index);
>  		val &= ~wakeup_setting;
> -		writel(val, usbmisc->base + data->index * 4);
>  	}
> +	writel(val, usbmisc->base + data->index * 4);
>  	spin_unlock_irqrestore(&usbmisc->lock, flags);
>  
>  	return ret;

Acked-by: Peter Chen <peter.chen@xxxxxxx>

-- 

Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux