From: Felipe Balbi > On Wed, Jul 16, 2014 at 09:32:21PM +0000, Paul Zimmerman wrote: > > > From: dinguyen@xxxxxxxxxx [mailto:dinguyen@xxxxxxxxxx] > > > Sent: Wednesday, July 16, 2014 1:33 PM > > > > > > Update dwc2_handle_common_intr() to handle both hcd and gadget interrupts. > > > > > > Signed-off-by: Dinh Nguyen <dinguyen@xxxxxxxxxx> > > > --- > > > drivers/usb/dwc2/core_intr.c | 116 +++++++++++++++++++++++++- > > > drivers/usb/dwc2/gadget.c | 188 ------------------------------------------ > > > 2 files changed, 114 insertions(+), 190 deletions(-) > > > > I wonder if this is necessary? Why not leave the interrupt handling > > for host and device as separate routines, and just call the > > appropriate one depending on which mode the core is in? It seems > > cleaner that way to me, and avoids having all of the interrupt > > handling code in a single giant function. > > I'll agree with here. You could even have completely separate functions > and request the irq line with IRQF_SHARED. The only extra overhead would > be a mode check at the begining of irq handler. Could you even add the interrupt handler after you know the mode? (Or remove the wrong one once you know the mode.) David -- 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