Commit e543ae896626a54c0c05e3c434312d6d033d450c

Authored by Mike Frysinger
Committed by Greg Kroah-Hartman
1 parent 7898aa5c39

UIO: uio_pdrv_genirq: allow custom irq_flags

I can't think of a reason why the driver prevents people from setting any
custom bits in their platform device, but I can think of some reasons for
allowing custom flags.  Like setting the IRQF_TRIGGER_... bits.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Hans J. Koch <hjk@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

Showing 1 changed file with 3 additions and 2 deletions Side-by-side Diff

drivers/uio/uio_pdrv_genirq.c
... ... @@ -81,7 +81,8 @@
81 81 goto bad0;
82 82 }
83 83  
84   - if (uioinfo->handler || uioinfo->irqcontrol || uioinfo->irq_flags) {
  84 + if (uioinfo->handler || uioinfo->irqcontrol ||
  85 + uioinfo->irq_flags & IRQF_SHARED) {
85 86 dev_err(&pdev->dev, "interrupt configuration error\n");
86 87 goto bad0;
87 88 }
... ... @@ -132,7 +133,7 @@
132 133 * Interrupt sharing is not supported.
133 134 */
134 135  
135   - uioinfo->irq_flags = IRQF_DISABLED;
  136 + uioinfo->irq_flags |= IRQF_DISABLED;
136 137 uioinfo->handler = uio_pdrv_genirq_handler;
137 138 uioinfo->irqcontrol = uio_pdrv_genirq_irqcontrol;
138 139 uioinfo->priv = priv;