On Thursday, July 17, 2014 8:54 AM, Felipe Balbi wrote: > On Wed, Jul 16, 2014 at 09:32:21PM +0000, Paul Zimmerman wrote: > > > On, Wednesday, July 16, 2014 1:33 PM, dinguyen@xxxxxxxxxx wrote: > > > > > > 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. > > ill 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. I am also in agreement with this opinion. Personally, it looks better to use IRQF_SHARED with completely separate functions. Best regards, Jingoo Han -- 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