summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelipe Balbi <felipe.balbi@linux.intel.com>2017-04-26 12:44:51 +0200
committerFelipe Balbi <felipe.balbi@linux.intel.com>2017-06-02 10:22:28 +0200
commitdfc5e80578f21552e7d5880ea7c0556b8b625895 (patch)
treef8ef73524cb0b76b368ff37d2cfce7cc18509bab
parentusb: dwc3: debugfs: slightly improve output of trb_ring (diff)
downloadlinux-dfc5e80578f21552e7d5880ea7c0556b8b625895.tar.xz
linux-dfc5e80578f21552e7d5880ea7c0556b8b625895.zip
usb: dwc3: gadget: slight cleanup to dwc3_process_event_entry()
No functional changes, just a slight readability improvement. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
-rw-r--r--drivers/usb/dwc3/gadget.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index e4e872c703f1..d2bd28dc28b6 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -2972,20 +2972,12 @@ static void dwc3_process_event_entry(struct dwc3 *dwc,
{
trace_dwc3_event(event->raw, dwc);
- /* Endpoint IRQ, handle it and return early */
- if (event->type.is_devspec == 0) {
- /* depevt */
- return dwc3_endpoint_interrupt(dwc, &event->depevt);
- }
-
- switch (event->type.type) {
- case DWC3_EVENT_TYPE_DEV:
+ if (!event->type.is_devspec)
+ dwc3_endpoint_interrupt(dwc, &event->depevt);
+ else if (event->type.type == DWC3_EVENT_TYPE_DEV)
dwc3_gadget_interrupt(dwc, &event->devt);
- break;
- /* REVISIT what to do with Carkit and I2C events ? */
- default:
+ else
dev_err(dwc->dev, "UNKNOWN IRQ type %d\n", event->raw);
- }
}
static irqreturn_t dwc3_process_event_buf(struct dwc3_event_buffer *evt)