pc110pad_data[pc110pad_count++] = value;
- if (pc110pad_count < 3) return;
+ if (pc110pad_count < 3)
+ return IRQ_HANDLED;
input_regs(&pc110pad_dev, regs);
input_report_key(&pc110pad_dev, BTN_TOUCH,
.write_reg = WriteISAR,
};
-static void
+static irqreturn_t
isurf_interrupt(int intno, void *dev_id, struct pt_regs *regs)
{
struct IsdnCardState *cs = dev_id;
writeb(0, cs->hw.isurf.isac + ISAC_MASK);mb();
writeb(ISAR_IRQMSK, cs->hw.isurf.isar + ISAR_IRQBIT); mb();
spin_unlock(&cs->lock);
+ return IRQ_HANDLED;
}
static void
printk("\n");
}
-static void saa7134_irq(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t saa7134_irq(int irq, void *dev_id, struct pt_regs *regs)
{
struct saa7134_dev *dev = (struct saa7134_dev*) dev_id;
unsigned long report,status;
if (irq_debug > 1)
printk(KERN_DEBUG "%s/irq: no (more) work\n",
dev->name);
- return;
+ goto out;
}
if (irq_debug)
print_irqstatus(dev,loop,report,status);
saa_writel(SAA7134_IRQ1,0);
saa_writel(SAA7134_IRQ2,0);
}
+out:
+ return IRQ_HANDLED;
}
/* ------------------------------------------------------------------ */
}
}
-static void zoran_irq(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t zoran_irq(int irq, void *dev_id, struct pt_regs *regs)
{
u32 stat, astat;
int count;
struct zoran *zr;
unsigned long flags;
+ int handled = 0;
zr = (struct zoran *) dev_id;
count = 0;
}
zr->last_isr = stat;
spin_unlock_irqrestore(&zr->lock, flags);
- return;
+ return IRQ_HANDLED;
}
spin_lock_irqsave(&zr->lock, flags);
if (!astat) {
break;
}
+ handled = 1;
if (astat & cardvsync[zr->card]) { // SW
if (zr->codec_mode == BUZ_MODE_MOTION_DECOMPRESS
zr->last_isr = stat;
}
spin_unlock_irqrestore(&zr->lock, flags);
+ return IRQ_RETVAL(handled);
}
/* Check a zoran_params struct for correctness, insert default params */
static void tms380tr_init_ipb(struct net_local *tp);
static void tms380tr_init_net_local(struct net_device *dev);
static void tms380tr_init_opb(struct net_device *dev);
-void tms380tr_interrupt(int irq, void *dev_id, struct pt_regs *regs);
/* "M" */
/* "O" */
int tms380tr_open(struct net_device *dev);
/*
* The typical workload of the driver: Handle the network interface interrupts.
*/
-void tms380tr_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+irqreturn_t tms380tr_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
struct net_device *dev = dev_id;
struct net_local *tp;
unsigned short irq_type;
+ int handled = 0;
if(dev == NULL) {
printk(KERN_INFO "%s: irq %d for unknown device.\n", dev->name, irq);
- return;
+ return IRQ_NONE;
}
tp = (struct net_local *)dev->priv;
irq_type = SIFREADW(SIFSTS);
while(irq_type & STS_SYSTEM_IRQ) {
+ handled = 1;
irq_type &= STS_IRQ_MASK;
if(!tms380tr_chk_ssb(tp, irq_type)) {
irq_type = SIFREADW(SIFSTS);
}
- return;
+ return IRQ_RETVAL(handled);
}
/*
#ifdef __KERNEL__
+#include <linux/interrupt.h>
+
/* module prototypes */
int tms380tr_open(struct net_device *dev);
int tms380tr_close(struct net_device *dev);
-void tms380tr_interrupt(int irq, void *dev_id, struct pt_regs *regs);
+irqreturn_t tms380tr_interrupt(int irq, void *dev_id, struct pt_regs *regs);
int tmsdev_init(struct net_device *dev, unsigned long dmalimit,
struct pci_dev *pdev);
void tmsdev_term(struct net_device *dev);
{
hdlc_device *hdlc = dev_to_hdlc(dev);
port_t *port = hdlc_to_port(hdlc);
+ int result;
if (!try_module_get(THIS_MODULE))
return -EFAULT; /* rmmod in progress */
- int result = hdlc_open(hdlc);
+ result = hdlc_open(hdlc);
if (result) {
return result;
module_put(THIS_MODULE);
* The interrupt service routine
* Dev_id is our fst_card_info pointer
*/
-static void
+static irqreturn_t
fst_intr ( int irq, void *dev_id, struct pt_regs *regs )
{
struct fst_card_info *card;
if (( card = dev_id ) == NULL )
{
dbg ( DBG_INTR,"intr: spurious %d\n", irq );
- return;
+ return IRQ_NONE;
}
dbg ( DBG_INTR,"intr: %d %p\n", irq, card );
}
spin_unlock ( &card->card_lock );
+ return IRQ_HANDLED;
}
-static void sca_intr(int irq, void* dev_id, struct pt_regs *regs)
+static irqreturn_t sca_intr(int irq, void* dev_id, struct pt_regs *regs)
{
card_t *card = dev_id;
int i;
u8 stat;
+ int handled = 0;
#ifndef ALL_PAGES_ALWAYS_MAPPED
u8 page = sca_get_page(card);
#endif
while((stat = sca_intr_status(card)) != 0) {
+ handled = 1;
for (i = 0; i < 2; i++) {
port_t *port = get_port(card, i);
if (port) {
#ifndef ALL_PAGES_ALWAYS_MAPPED
openwin(card, page); /* Restore original page */
#endif
+ return IRQ_RETVAL(handled);
}
port_t *port = hdlc_to_port(hdlc);
int io = port->card->io;
u8 mcr = inb(io + N2_MCR) | (port->phy_node ? TX422_PORT1:TX422_PORT0);
+ int result;
if (!try_module_get(THIS_MODULE))
return -EFAULT; /* rmmod in progress */
- int result = hdlc_open(hdlc);
+ result = hdlc_open(hdlc);
if (result) {
return result;
module_put(THIS_MODULE);
* channel). c->lock for both channels points to dev->lock
*/
-void z8530_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+irqreturn_t z8530_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
struct z8530_dev *dev=dev_id;
u8 intr;
if(locker)
{
printk(KERN_ERR "IRQ re-enter\n");
- return;
+ return IRQ_NONE;
}
locker=1;
printk(KERN_ERR "%s: interrupt jammed - abort(0x%X)!\n", dev->name, intr);
/* Ok all done */
locker=0;
+ return IRQ_HANDLED;
}
EXPORT_SYMBOL(z8530_interrupt);
#define _Z8530_H
#include <linux/tty.h>
+#include <linux/interrupt.h>
/* Conversion routines to/from brg time constants from/to bits
* per second.
extern u8 z8530_dead_port[];
extern u8 z8530_hdlc_kilostream_85230[];
extern u8 z8530_hdlc_kilostream[];
-extern void z8530_interrupt(int, void *, struct pt_regs *);
+extern irqreturn_t z8530_interrupt(int, void *, struct pt_regs *);
extern void z8530_describe(struct z8530_dev *, char *mapping, unsigned long io);
extern int z8530_init(struct z8530_dev *);
extern int z8530_shutdown(struct z8530_dev *);