Skip to content

Commit

Permalink
[ARM] Convert request_irq+set_irq_type to request_irq with SA_TRIGGER
Browse files Browse the repository at this point in the history
There's no need to have request_irq followed by set_irq_type.
Just use request_irq with the appropriate SA_TRIGGER flags.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Russell King authored and Russell King committed Jan 19, 2006
1 parent 0f36b01 commit f43aaba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
9 changes: 3 additions & 6 deletions drivers/input/touchscreen/ads7846.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@
#ifdef CONFIG_ARCH_OMAP
#include <asm/arch/gpio.h>
#endif

#else
#define set_irq_type(irq,type) do{}while(0)
#endif


Expand Down Expand Up @@ -509,14 +506,14 @@ static int __devinit ads7846_probe(struct spi_device *spi)
ts->msg.complete = ads7846_rx;
ts->msg.context = ts;

if (request_irq(spi->irq, ads7846_irq, SA_SAMPLE_RANDOM,
spi->dev.bus_id, ts)) {
if (request_irq(spi->irq, ads7846_irq,
SA_SAMPLE_RANDOM | SA_TRIGGER_FALLING,
spi->dev.bus_id, ts)) {
dev_dbg(&spi->dev, "irq %d busy?\n", spi->irq);
input_unregister_device(&ts->input);
kfree(ts);
return -EBUSY;
}
set_irq_type(spi->irq, IRQT_FALLING);

dev_info(&spi->dev, "touchscreen, irq %d\n", spi->irq);

Expand Down
4 changes: 2 additions & 2 deletions drivers/serial/imx.c
Original file line number Diff line number Diff line change
Expand Up @@ -402,10 +402,10 @@ static int imx_startup(struct uart_port *port)
DRIVER_NAME, sport);
if (retval) goto error_out2;

retval = request_irq(sport->rtsirq, imx_rtsint, 0,
retval = request_irq(sport->rtsirq, imx_rtsint,
SA_TRIGGER_FALLING | SA_TRIGGER_RISING,
DRIVER_NAME, sport);
if (retval) goto error_out3;
set_irq_type(sport->rtsirq, IRQT_BOTHEDGE);

/*
* Finally, clear and enable interrupts
Expand Down

0 comments on commit f43aaba

Please sign in to comment.