Skip to content

Commit

Permalink
usb: chipidea: usbmisc: small clean up
Browse files Browse the repository at this point in the history
The register write can be done outside the if and else condition

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Michael Trimarchi authored and Greg Kroah-Hartman committed Mar 29, 2018
1 parent 26250d5 commit 274a187
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/usb/chipidea/usbmisc_imx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 274a187

Please sign in to comment.