diff options
author | Lee Jones <lee.jones@linaro.org> | 2020-07-15 10:32:02 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-07-15 17:25:56 +0200 |
commit | 9607f3cd8b6633cae5a9c43d8a537add1af801da (patch) | |
tree | c89f5e7f75768ecaa83ace920b022b123188f912 /drivers/usb/dwc2 | |
parent | e4dfa8029925f6200f6ab2db5a25d86fd082e9cf (diff) | |
download | linux-9607f3cd8b6633cae5a9c43d8a537add1af801da.tar.bz2 |
usb: dwc2: gadget: Make use of GINTMSK2
The value obtained from GINTSTS2 should be masked with the GINTMSK2
value. Looks like this has been broken since
dwc2_gadget_wkup_alert_handler() was added back in 2018.
Also fixes the following W=1 warning:
drivers/usb/dwc2/gadget.c: In function ‘dwc2_gadget_wkup_alert_handler’:
drivers/usb/dwc2/gadget.c:259:6: warning: variable ‘gintmsk2’ set but not used [-Wunused-but-set-variable]
259 | u32 gintmsk2;
| ^~~~~~~~
Cc: Ben Dooks <ben@simtec.co.uk>
Fixes: 187c5298a1229 ("usb: dwc2: gadget: Add handler for WkupAlert interrupt")
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Minas Harutyunyan <hminas@synopsys.com>
Link: https://lore.kernel.org/r/20200715093209.3165641-2-lee.jones@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/dwc2')
-rw-r--r-- | drivers/usb/dwc2/gadget.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index df5fedaca60a..03cf1fa85621 100644 --- a/drivers/usb/dwc2/gadget.c +++ b/drivers/usb/dwc2/gadget.c @@ -260,6 +260,7 @@ static void dwc2_gadget_wkup_alert_handler(struct dwc2_hsotg *hsotg) gintsts2 = dwc2_readl(hsotg, GINTSTS2); gintmsk2 = dwc2_readl(hsotg, GINTMSK2); + gintsts2 &= gintmsk2; if (gintsts2 & GINTSTS2_WKUP_ALERT_INT) { dev_dbg(hsotg->dev, "%s: Wkup_Alert_Int\n", __func__); |