diff options
author | Michael Opdenacker <michael.opdenacker@free-electrons.com> | 2013-10-13 03:14:19 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-10-14 14:09:12 -0400 |
commit | 88ed9fd50e573fee332ca1e07641102b59f743fe (patch) | |
tree | 1ba3be7f14db8754f9ea1be784e1f4915077ae41 /drivers/usb/core | |
parent | a393a807d0c805e7c723315ff0e88a857055e9c6 (diff) |
usb/hcd: remove unnecessary local_irq_save
Remove the use of local_irq_save() and IRQF_DISABLED, no longer needed since
interrupt handlers are always run with interrupts disabled on the
current CPU.
Tested successfully with 3.12.0-rc4 on my PC. Didn't find
any issue because of this change.
Signed-off-by: Michael Opdenacker <michael.opdenacker@free-electrons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/core')
-rw-r--r-- | drivers/usb/core/hcd.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index 6ec8dda31118..6bffb8c87bc9 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c | |||
@@ -2331,15 +2331,8 @@ EXPORT_SYMBOL_GPL(usb_bus_start_enum); | |||
2331 | irqreturn_t usb_hcd_irq (int irq, void *__hcd) | 2331 | irqreturn_t usb_hcd_irq (int irq, void *__hcd) |
2332 | { | 2332 | { |
2333 | struct usb_hcd *hcd = __hcd; | 2333 | struct usb_hcd *hcd = __hcd; |
2334 | unsigned long flags; | ||
2335 | irqreturn_t rc; | 2334 | irqreturn_t rc; |
2336 | 2335 | ||
2337 | /* IRQF_DISABLED doesn't work correctly with shared IRQs | ||
2338 | * when the first handler doesn't use it. So let's just | ||
2339 | * assume it's never used. | ||
2340 | */ | ||
2341 | local_irq_save(flags); | ||
2342 | |||
2343 | if (unlikely(HCD_DEAD(hcd) || !HCD_HW_ACCESSIBLE(hcd))) | 2336 | if (unlikely(HCD_DEAD(hcd) || !HCD_HW_ACCESSIBLE(hcd))) |
2344 | rc = IRQ_NONE; | 2337 | rc = IRQ_NONE; |
2345 | else if (hcd->driver->irq(hcd) == IRQ_NONE) | 2338 | else if (hcd->driver->irq(hcd) == IRQ_NONE) |
@@ -2347,7 +2340,6 @@ irqreturn_t usb_hcd_irq (int irq, void *__hcd) | |||
2347 | else | 2340 | else |
2348 | rc = IRQ_HANDLED; | 2341 | rc = IRQ_HANDLED; |
2349 | 2342 | ||
2350 | local_irq_restore(flags); | ||
2351 | return rc; | 2343 | return rc; |
2352 | } | 2344 | } |
2353 | EXPORT_SYMBOL_GPL(usb_hcd_irq); | 2345 | EXPORT_SYMBOL_GPL(usb_hcd_irq); |
@@ -2554,13 +2546,6 @@ static int usb_hcd_request_irqs(struct usb_hcd *hcd, | |||
2554 | 2546 | ||
2555 | if (hcd->driver->irq) { | 2547 | if (hcd->driver->irq) { |
2556 | 2548 | ||
2557 | /* IRQF_DISABLED doesn't work as advertised when used together | ||
2558 | * with IRQF_SHARED. As usb_hcd_irq() will always disable | ||
2559 | * interrupts we can remove it here. | ||
2560 | */ | ||
2561 | if (irqflags & IRQF_SHARED) | ||
2562 | irqflags &= ~IRQF_DISABLED; | ||
2563 | |||
2564 | snprintf(hcd->irq_descr, sizeof(hcd->irq_descr), "%s:usb%d", | 2549 | snprintf(hcd->irq_descr, sizeof(hcd->irq_descr), "%s:usb%d", |
2565 | hcd->driver->description, hcd->self.busnum); | 2550 | hcd->driver->description, hcd->self.busnum); |
2566 | retval = request_irq(irqnum, &usb_hcd_irq, irqflags, | 2551 | retval = request_irq(irqnum, &usb_hcd_irq, irqflags, |