only force IRQF_ONESHOT in case HCD_NO_ONESHOT is *not* set. As a precaution, WARN() in case IRQF_ONESHOT is already set elsewhere and we have HCD_NO_ONESHOT also enabled. Signed-off-by: Felipe Balbi <felipe.balbi@xxxxxxxxxxxxxxx> --- drivers/usb/core/hcd.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index 66dc5a8dfca8..6d4b4f773c92 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c @@ -2677,14 +2677,21 @@ static int usb_hcd_request_irqs(struct usb_hcd *hcd, * leaving IRQF_ONESHOT in place, but soon enough we plan on * removing that after all HCDs are fixed. */ - if (hcd->driver->threaded_irq) + if (hcd->driver->threaded_irq) { + if (!(hcd->driver->flags & HCD_NO_ONESHOT)) + irqflags |= IRQF_ONESHOT; + else + WARN_ONCE(irqflags & IRQF_ONESHOT, + "HCD_NO_ONESHOT set, why IRQF_ONESHOT?\n"); + retval = request_threaded_irq(irqnum, usb_hcd_irq, - usb_hcd_threaded_irq, - irqflags | IRQF_ONESHOT, hcd->irq_descr, - hcd); - else + usb_hcd_threaded_irq, irqflags, + hcd->irq_descr, hcd); + } else { retval = request_irq(irqnum, usb_hcd_irq, irqflags, hcd->irq_descr, hcd); + } + if (retval != 0) { dev_err(hcd->self.controller, "request interrupt %d failed\n", -- 2.8.0.rc2 -- 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