* [RFC,3/3] usb: chipidea: usbmisc: small clean up
@ 2018-01-13 15:41 Michael Trimarchi
0 siblings, 0 replies; 2+ messages in thread
From: Michael Trimarchi @ 2018-01-13 15:41 UTC (permalink / raw)
To: Peter Chen; +Cc: linux-usb, Greg Kroah-Hartman, michael
The register write can be done outside the if and else condition
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
---
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;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [RFC,3/3] usb: chipidea: usbmisc: small clean up
@ 2018-01-15 3:08 Peter Chen
0 siblings, 0 replies; 2+ messages in thread
From: Peter Chen @ 2018-01-15 3:08 UTC (permalink / raw)
To: Michael Trimarchi; +Cc: Peter Chen, linux-usb, Greg Kroah-Hartman
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@amarulasolutions.com>
> ---
> 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@nxp.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-01-15 3:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-15 3:08 [RFC,3/3] usb: chipidea: usbmisc: small clean up Peter Chen
-- strict thread matches above, loose matches on Subject: below --
2018-01-13 15:41 Michael Trimarchi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).