Commit 87282629 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] various irqreturn_t fixes

Basically a mop-up of missed bits.  Also fix various warnings and compilation
errors.
parent a8ebd4db
...@@ -71,7 +71,8 @@ static irqreturn_t pc110pad_interrupt(int irq, void *ptr, struct pt_regs *regs) ...@@ -71,7 +71,8 @@ static irqreturn_t pc110pad_interrupt(int irq, void *ptr, struct pt_regs *regs)
pc110pad_data[pc110pad_count++] = value; pc110pad_data[pc110pad_count++] = value;
if (pc110pad_count < 3) return; if (pc110pad_count < 3)
return IRQ_HANDLED;
input_regs(&pc110pad_dev, regs); input_regs(&pc110pad_dev, regs);
input_report_key(&pc110pad_dev, BTN_TOUCH, input_report_key(&pc110pad_dev, BTN_TOUCH,
......
...@@ -94,7 +94,7 @@ static struct bc_hw_ops isar_ops = { ...@@ -94,7 +94,7 @@ static struct bc_hw_ops isar_ops = {
.write_reg = WriteISAR, .write_reg = WriteISAR,
}; };
static void static irqreturn_t
isurf_interrupt(int intno, void *dev_id, struct pt_regs *regs) isurf_interrupt(int intno, void *dev_id, struct pt_regs *regs)
{ {
struct IsdnCardState *cs = dev_id; struct IsdnCardState *cs = dev_id;
...@@ -130,6 +130,7 @@ isurf_interrupt(int intno, void *dev_id, struct pt_regs *regs) ...@@ -130,6 +130,7 @@ isurf_interrupt(int intno, void *dev_id, struct pt_regs *regs)
writeb(0, cs->hw.isurf.isac + ISAC_MASK);mb(); writeb(0, cs->hw.isurf.isac + ISAC_MASK);mb();
writeb(ISAR_IRQMSK, cs->hw.isurf.isar + ISAR_IRQBIT); mb(); writeb(ISAR_IRQMSK, cs->hw.isurf.isar + ISAR_IRQBIT); mb();
spin_unlock(&cs->lock); spin_unlock(&cs->lock);
return IRQ_HANDLED;
} }
static void static void
......
...@@ -532,7 +532,7 @@ static void print_irqstatus(struct saa7134_dev *dev, int loop, ...@@ -532,7 +532,7 @@ static void print_irqstatus(struct saa7134_dev *dev, int loop,
printk("\n"); 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; struct saa7134_dev *dev = (struct saa7134_dev*) dev_id;
unsigned long report,status; unsigned long report,status;
...@@ -546,7 +546,7 @@ static void saa7134_irq(int irq, void *dev_id, struct pt_regs *regs) ...@@ -546,7 +546,7 @@ static void saa7134_irq(int irq, void *dev_id, struct pt_regs *regs)
if (irq_debug > 1) if (irq_debug > 1)
printk(KERN_DEBUG "%s/irq: no (more) work\n", printk(KERN_DEBUG "%s/irq: no (more) work\n",
dev->name); dev->name);
return; goto out;
} }
if (irq_debug) if (irq_debug)
print_irqstatus(dev,loop,report,status); print_irqstatus(dev,loop,report,status);
...@@ -582,6 +582,8 @@ static void saa7134_irq(int irq, void *dev_id, struct pt_regs *regs) ...@@ -582,6 +582,8 @@ static void saa7134_irq(int irq, void *dev_id, struct pt_regs *regs)
saa_writel(SAA7134_IRQ1,0); saa_writel(SAA7134_IRQ1,0);
saa_writel(SAA7134_IRQ2,0); saa_writel(SAA7134_IRQ2,0);
} }
out:
return IRQ_HANDLED;
} }
/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */
......
...@@ -2780,12 +2780,13 @@ static void error_handler(struct zoran *zr, u32 astat, u32 stat) ...@@ -2780,12 +2780,13 @@ static void error_handler(struct zoran *zr, u32 astat, u32 stat)
} }
} }
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; u32 stat, astat;
int count; int count;
struct zoran *zr; struct zoran *zr;
unsigned long flags; unsigned long flags;
int handled = 0;
zr = (struct zoran *) dev_id; zr = (struct zoran *) dev_id;
count = 0; count = 0;
...@@ -2804,7 +2805,7 @@ static void zoran_irq(int irq, void *dev_id, struct pt_regs *regs) ...@@ -2804,7 +2805,7 @@ static void zoran_irq(int irq, void *dev_id, struct pt_regs *regs)
} }
zr->last_isr = stat; zr->last_isr = stat;
spin_unlock_irqrestore(&zr->lock, flags); spin_unlock_irqrestore(&zr->lock, flags);
return; return IRQ_HANDLED;
} }
spin_lock_irqsave(&zr->lock, flags); spin_lock_irqsave(&zr->lock, flags);
...@@ -2815,6 +2816,7 @@ static void zoran_irq(int irq, void *dev_id, struct pt_regs *regs) ...@@ -2815,6 +2816,7 @@ static void zoran_irq(int irq, void *dev_id, struct pt_regs *regs)
if (!astat) { if (!astat) {
break; break;
} }
handled = 1;
if (astat & cardvsync[zr->card]) { // SW if (astat & cardvsync[zr->card]) { // SW
if (zr->codec_mode == BUZ_MODE_MOTION_DECOMPRESS if (zr->codec_mode == BUZ_MODE_MOTION_DECOMPRESS
...@@ -3008,6 +3010,7 @@ static void zoran_irq(int irq, void *dev_id, struct pt_regs *regs) ...@@ -3008,6 +3010,7 @@ static void zoran_irq(int irq, void *dev_id, struct pt_regs *regs)
zr->last_isr = stat; zr->last_isr = stat;
} }
spin_unlock_irqrestore(&zr->lock, flags); spin_unlock_irqrestore(&zr->lock, flags);
return IRQ_RETVAL(handled);
} }
/* Check a zoran_params struct for correctness, insert default params */ /* Check a zoran_params struct for correctness, insert default params */
......
...@@ -152,7 +152,6 @@ static int tms380tr_init_card(struct net_device *dev); ...@@ -152,7 +152,6 @@ static int tms380tr_init_card(struct net_device *dev);
static void tms380tr_init_ipb(struct net_local *tp); static void tms380tr_init_ipb(struct net_local *tp);
static void tms380tr_init_net_local(struct net_device *dev); static void tms380tr_init_net_local(struct net_device *dev);
static void tms380tr_init_opb(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" */ /* "M" */
/* "O" */ /* "O" */
int tms380tr_open(struct net_device *dev); int tms380tr_open(struct net_device *dev);
...@@ -780,15 +779,16 @@ static void tms380tr_timer_chk(unsigned long data) ...@@ -780,15 +779,16 @@ static void tms380tr_timer_chk(unsigned long data)
/* /*
* The typical workload of the driver: Handle the network interface interrupts. * 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_device *dev = dev_id;
struct net_local *tp; struct net_local *tp;
unsigned short irq_type; unsigned short irq_type;
int handled = 0;
if(dev == NULL) { if(dev == NULL) {
printk(KERN_INFO "%s: irq %d for unknown device.\n", dev->name, irq); printk(KERN_INFO "%s: irq %d for unknown device.\n", dev->name, irq);
return; return IRQ_NONE;
} }
tp = (struct net_local *)dev->priv; tp = (struct net_local *)dev->priv;
...@@ -796,6 +796,7 @@ void tms380tr_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -796,6 +796,7 @@ void tms380tr_interrupt(int irq, void *dev_id, struct pt_regs *regs)
irq_type = SIFREADW(SIFSTS); irq_type = SIFREADW(SIFSTS);
while(irq_type & STS_SYSTEM_IRQ) { while(irq_type & STS_SYSTEM_IRQ) {
handled = 1;
irq_type &= STS_IRQ_MASK; irq_type &= STS_IRQ_MASK;
if(!tms380tr_chk_ssb(tp, irq_type)) { if(!tms380tr_chk_ssb(tp, irq_type)) {
...@@ -870,7 +871,7 @@ void tms380tr_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -870,7 +871,7 @@ void tms380tr_interrupt(int irq, void *dev_id, struct pt_regs *regs)
irq_type = SIFREADW(SIFSTS); irq_type = SIFREADW(SIFSTS);
} }
return; return IRQ_RETVAL(handled);
} }
/* /*
......
...@@ -11,10 +11,12 @@ ...@@ -11,10 +11,12 @@
#ifdef __KERNEL__ #ifdef __KERNEL__
#include <linux/interrupt.h>
/* module prototypes */ /* module prototypes */
int tms380tr_open(struct net_device *dev); int tms380tr_open(struct net_device *dev);
int tms380tr_close(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, int tmsdev_init(struct net_device *dev, unsigned long dmalimit,
struct pci_dev *pdev); struct pci_dev *pdev);
void tmsdev_term(struct net_device *dev); void tmsdev_term(struct net_device *dev);
......
...@@ -155,11 +155,12 @@ static int c101_open(struct net_device *dev) ...@@ -155,11 +155,12 @@ static int c101_open(struct net_device *dev)
{ {
hdlc_device *hdlc = dev_to_hdlc(dev); hdlc_device *hdlc = dev_to_hdlc(dev);
port_t *port = hdlc_to_port(hdlc); port_t *port = hdlc_to_port(hdlc);
int result;
if (!try_module_get(THIS_MODULE)) if (!try_module_get(THIS_MODULE))
return -EFAULT; /* rmmod in progress */ return -EFAULT; /* rmmod in progress */
int result = hdlc_open(hdlc); result = hdlc_open(hdlc);
if (result) { if (result) {
return result; return result;
module_put(THIS_MODULE); module_put(THIS_MODULE);
......
...@@ -772,7 +772,7 @@ fst_intr_rx ( struct fst_card_info *card, struct fst_port_info *port ) ...@@ -772,7 +772,7 @@ fst_intr_rx ( struct fst_card_info *card, struct fst_port_info *port )
* The interrupt service routine * The interrupt service routine
* Dev_id is our fst_card_info pointer * Dev_id is our fst_card_info pointer
*/ */
static void static irqreturn_t
fst_intr ( int irq, void *dev_id, struct pt_regs *regs ) fst_intr ( int irq, void *dev_id, struct pt_regs *regs )
{ {
struct fst_card_info *card; struct fst_card_info *card;
...@@ -785,7 +785,7 @@ fst_intr ( int irq, void *dev_id, struct pt_regs *regs ) ...@@ -785,7 +785,7 @@ fst_intr ( int irq, void *dev_id, struct pt_regs *regs )
if (( card = dev_id ) == NULL ) if (( card = dev_id ) == NULL )
{ {
dbg ( DBG_INTR,"intr: spurious %d\n", irq ); dbg ( DBG_INTR,"intr: spurious %d\n", irq );
return; return IRQ_NONE;
} }
dbg ( DBG_INTR,"intr: %d %p\n", irq, card ); dbg ( DBG_INTR,"intr: %d %p\n", irq, card );
...@@ -882,6 +882,7 @@ fst_intr ( int irq, void *dev_id, struct pt_regs *regs ) ...@@ -882,6 +882,7 @@ fst_intr ( int irq, void *dev_id, struct pt_regs *regs )
} }
spin_unlock ( &card->card_lock ); spin_unlock ( &card->card_lock );
return IRQ_HANDLED;
} }
......
...@@ -408,17 +408,19 @@ static inline void sca_tx_intr(port_t *port) ...@@ -408,17 +408,19 @@ static inline void sca_tx_intr(port_t *port)
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; card_t *card = dev_id;
int i; int i;
u8 stat; u8 stat;
int handled = 0;
#ifndef ALL_PAGES_ALWAYS_MAPPED #ifndef ALL_PAGES_ALWAYS_MAPPED
u8 page = sca_get_page(card); u8 page = sca_get_page(card);
#endif #endif
while((stat = sca_intr_status(card)) != 0) { while((stat = sca_intr_status(card)) != 0) {
handled = 1;
for (i = 0; i < 2; i++) { for (i = 0; i < 2; i++) {
port_t *port = get_port(card, i); port_t *port = get_port(card, i);
if (port) { if (port) {
...@@ -437,6 +439,7 @@ static void sca_intr(int irq, void* dev_id, struct pt_regs *regs) ...@@ -437,6 +439,7 @@ static void sca_intr(int irq, void* dev_id, struct pt_regs *regs)
#ifndef ALL_PAGES_ALWAYS_MAPPED #ifndef ALL_PAGES_ALWAYS_MAPPED
openwin(card, page); /* Restore original page */ openwin(card, page); /* Restore original page */
#endif #endif
return IRQ_RETVAL(handled);
} }
......
...@@ -216,12 +216,13 @@ static int n2_open(struct net_device *dev) ...@@ -216,12 +216,13 @@ static int n2_open(struct net_device *dev)
port_t *port = hdlc_to_port(hdlc); port_t *port = hdlc_to_port(hdlc);
int io = port->card->io; int io = port->card->io;
u8 mcr = inb(io + N2_MCR) | (port->phy_node ? TX422_PORT1:TX422_PORT0); u8 mcr = inb(io + N2_MCR) | (port->phy_node ? TX422_PORT1:TX422_PORT0);
int result;
if (!try_module_get(THIS_MODULE)) if (!try_module_get(THIS_MODULE))
return -EFAULT; /* rmmod in progress */ return -EFAULT; /* rmmod in progress */
int result = hdlc_open(hdlc); result = hdlc_open(hdlc);
if (result) { if (result) {
return result; return result;
module_put(THIS_MODULE); module_put(THIS_MODULE);
......
...@@ -718,7 +718,7 @@ EXPORT_SYMBOL(z8530_nop); ...@@ -718,7 +718,7 @@ EXPORT_SYMBOL(z8530_nop);
* channel). c->lock for both channels points to dev->lock * 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; struct z8530_dev *dev=dev_id;
u8 intr; u8 intr;
...@@ -729,7 +729,7 @@ void z8530_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -729,7 +729,7 @@ void z8530_interrupt(int irq, void *dev_id, struct pt_regs *regs)
if(locker) if(locker)
{ {
printk(KERN_ERR "IRQ re-enter\n"); printk(KERN_ERR "IRQ re-enter\n");
return; return IRQ_NONE;
} }
locker=1; locker=1;
...@@ -775,6 +775,7 @@ void z8530_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -775,6 +775,7 @@ void z8530_interrupt(int irq, void *dev_id, struct pt_regs *regs)
printk(KERN_ERR "%s: interrupt jammed - abort(0x%X)!\n", dev->name, intr); printk(KERN_ERR "%s: interrupt jammed - abort(0x%X)!\n", dev->name, intr);
/* Ok all done */ /* Ok all done */
locker=0; locker=0;
return IRQ_HANDLED;
} }
EXPORT_SYMBOL(z8530_interrupt); EXPORT_SYMBOL(z8530_interrupt);
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#define _Z8530_H #define _Z8530_H
#include <linux/tty.h> #include <linux/tty.h>
#include <linux/interrupt.h>
/* Conversion routines to/from brg time constants from/to bits /* Conversion routines to/from brg time constants from/to bits
* per second. * per second.
...@@ -399,7 +400,7 @@ struct z8530_dev ...@@ -399,7 +400,7 @@ struct z8530_dev
extern u8 z8530_dead_port[]; extern u8 z8530_dead_port[];
extern u8 z8530_hdlc_kilostream_85230[]; extern u8 z8530_hdlc_kilostream_85230[];
extern u8 z8530_hdlc_kilostream[]; 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 void z8530_describe(struct z8530_dev *, char *mapping, unsigned long io);
extern int z8530_init(struct z8530_dev *); extern int z8530_init(struct z8530_dev *);
extern int z8530_shutdown(struct z8530_dev *); extern int z8530_shutdown(struct z8530_dev *);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment