Skip to content

Commit

Permalink
usb: isp1760: set IRQ flags properly
Browse files Browse the repository at this point in the history
The IRQF_DISABLED is a NOOP and scheduled to be removed.  According to
commit e58aa3d ("genirq: Run irq handlers with interrupts
disabled") running IRQ handlers with interrupts enabled can cause stack
overflows when the interrupt line of the issuing device is still active.

This patch removes using this deprecated flag and additionally removes
redundantly setting IRQF_SHARED for isp1760_udc_register().

Signed-off-by: Valentin Rothberg <Valentin.Rothberg@lip6.fr>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Valentin Rothberg authored and Felipe Balbi committed Mar 9, 2015
1 parent 1c390eb commit 80b4a0f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions drivers/usb/isp1760/isp1760-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,7 @@ int isp1760_register(struct resource *mem, int irq, unsigned long irqflags,
}

if (IS_ENABLED(CONFIG_USB_ISP1761_UDC) && !udc_disabled) {
ret = isp1760_udc_register(isp, irq, irqflags | IRQF_SHARED |
IRQF_DISABLED);
ret = isp1760_udc_register(isp, irq, irqflags);
if (ret < 0) {
isp1760_hcd_unregister(&isp->hcd);
return ret;
Expand Down
4 changes: 2 additions & 2 deletions drivers/usb/isp1760/isp1760-udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1453,8 +1453,8 @@ int isp1760_udc_register(struct isp1760_device *isp, int irq,

sprintf(udc->irqname, "%s (udc)", devname);

ret = request_irq(irq, isp1760_udc_irq, IRQF_SHARED | IRQF_DISABLED |
irqflags, udc->irqname, udc);
ret = request_irq(irq, isp1760_udc_irq, IRQF_SHARED | irqflags,
udc->irqname, udc);
if (ret < 0)
goto error;

Expand Down

0 comments on commit 80b4a0f

Please sign in to comment.