Commit a1f92be4 authored by Paul Mackerras's avatar Paul Mackerras

PPC32: Change interrupt handlers to return irqreturn_t.

parent ca58a02d
......@@ -431,11 +431,7 @@ static void siccuart_event(struct SICC_info *info, int event)
}
static void
#ifdef SUPPORT_SYSRQ
siccuart_rx_chars(struct SICC_info *info, struct pt_regs *regs)
#else
siccuart_rx_chars(struct SICC_info *info)
#endif
{
struct tty_struct *tty = info->tty;
unsigned int status, ch, rsr, flg, ignored = 0;
......@@ -574,25 +570,19 @@ static void siccuart_tx_chars(struct SICC_info *info)
}
static void siccuart_int_rx(int irq, void *dev_id, struct pt_regs *regs)
static irqreturn_t siccuart_int_rx(int irq, void *dev_id, struct pt_regs *regs)
{
struct SICC_info *info = dev_id;
#ifdef SUPPORT_SYSRQ
siccuart_rx_chars(info, regs);
#else
siccuart_rx_chars(info);
#endif
//powerpcClearUicsrBits(0x00000400);
return IRQ_HANDLED;
}
static void siccuart_int_tx(int irq, void *dev_id, struct pt_regs *regs)
static irqreturn_t siccuart_int_tx(int irq, void *dev_id, struct pt_regs *regs)
{
struct SICC_info *info = dev_id;
siccuart_tx_chars(info);
return IRQ_HANDLED;
}
static void siccuart_tasklet_action(unsigned long data)
......
......@@ -122,7 +122,7 @@ struct scc_enet_private {
static int scc_enet_open(struct net_device *dev);
static int scc_enet_start_xmit(struct sk_buff *skb, struct net_device *dev);
static int scc_enet_rx(struct net_device *dev);
static void scc_enet_interrupt(int irq, void * dev_id, struct pt_regs * regs);
static irqreturn_t scc_enet_interrupt(int irq, void *dev_id, struct pt_regs *);
static int scc_enet_close(struct net_device *dev);
static struct net_device_stats *scc_enet_get_stats(struct net_device *dev);
static void set_multicast_list(struct net_device *dev);
......@@ -272,7 +272,7 @@ scc_enet_timeout(struct net_device *dev)
/* The interrupt handler.
* This is called from the CPM handler, not the MPC core interrupt.
*/
static void
static irqreturn_t
scc_enet_interrupt(int irq, void * dev_id, struct pt_regs * regs)
{
struct net_device *dev = dev_id;
......@@ -403,7 +403,7 @@ scc_enet_interrupt(int irq, void * dev_id, struct pt_regs * regs)
printk("SCC ENET: BSY can't happen.\n");
}
return;
return IRQ_HANDLED;
}
/* During a receive, the cur_rx points to the current incoming buffer.
......
......@@ -126,7 +126,7 @@ typedef struct {
static int fcc_enet_open(struct net_device *dev);
static int fcc_enet_start_xmit(struct sk_buff *skb, struct net_device *dev);
static int fcc_enet_rx(struct net_device *dev);
static void fcc_enet_interrupt(int irq, void * dev_id, struct pt_regs * regs);
static irqreturn_t fcc_enet_interrupt(int irq, void *dev_id, struct pt_regs *);
static int fcc_enet_close(struct net_device *dev);
static struct net_device_stats *fcc_enet_get_stats(struct net_device *dev);
static void set_multicast_list(struct net_device *dev);
......@@ -452,7 +452,7 @@ fcc_enet_timeout(struct net_device *dev)
}
/* The interrupt handler. */
static void
static irqreturn_t
fcc_enet_interrupt(int irq, void * dev_id, struct pt_regs * regs)
{
struct net_device *dev = dev_id;
......@@ -583,7 +583,7 @@ fcc_enet_interrupt(int irq, void * dev_id, struct pt_regs * regs)
if (int_events & FCC_ENET_BSY) {
cep->stats.rx_dropped++;
}
return;
return IRQ_HANDLED;
}
/* During a receive, the cur_rx points to the current incoming buffer.
......@@ -1203,7 +1203,7 @@ mii_discover_phy(uint mii_reg, struct net_device *dev)
}
/* This interrupt occurs when the PHY detects a link change. */
static void
static irqreturn_t
mii_link_interrupt(int irq, void * dev_id, struct pt_regs * regs)
{
struct net_device *dev = dev_id;
......@@ -1211,6 +1211,7 @@ mii_link_interrupt(int irq, void * dev_id, struct pt_regs * regs)
mii_do_cmd(dev, fep->phy->ack_int);
mii_do_cmd(dev, phy_cmd_relink); /* restart and display status */
return IRQ_HANDLED;
}
#endif /* CONFIG_USE_MDIO */
......
......@@ -570,7 +570,7 @@ static _INLINE_ void check_modem_status(struct async_struct *info)
/*
* This is the serial driver's interrupt routine for a single port
*/
static void rs_8xx_interrupt(int irq, void * dev_id, struct pt_regs * regs)
static irqreturn_t rs_8xx_interrupt(int irq, void * dev_id, struct pt_regs * regs)
{
u_char events;
int idx;
......@@ -610,6 +610,7 @@ static void rs_8xx_interrupt(int irq, void * dev_id, struct pt_regs * regs)
#ifdef SERIAL_DEBUG_INTR
printk("end.\n");
#endif
return IRQ_HANDLED;
}
......
......@@ -55,10 +55,6 @@
#include <asm/amigappc.h>
#endif
extern int cia_request_irq(int irq,
void (*handler)(int, void *, struct pt_regs *),
unsigned long flags, const char *devname, void *dev_id);
extern void cia_free_irq(unsigned int irq, void *dev_id);
extern void cia_init_IRQ(struct ciabase *base);
unsigned short ami_intena_vals[AMI_STD_IRQS] = {
......
......@@ -71,7 +71,7 @@ static char amiga_model_name[13] = "Amiga ";
extern char m68k_debug_device[];
static void amiga_sched_init(void (*handler)(int, void *, struct pt_regs *));
static void amiga_sched_init(irqreturn_t (*handler)(int, void *, struct pt_regs *));
/* amiga specific irq functions */
extern void amiga_init_IRQ (void);
extern void (*amiga_default_handler[]) (int, void *, struct pt_regs *);
......@@ -478,7 +478,7 @@ void __init config_amiga(void)
static unsigned short jiffy_ticks;
static void __init amiga_sched_init(void (*timer_routine)(int, void *,
static void __init amiga_sched_init(irqreturn_t (*timer_routine)(int, void *,
struct pt_regs *))
{
static struct resource sched_res = {
......
......@@ -210,7 +210,8 @@ void free_irq(unsigned int irq, void* dev_id)
return;
}
int request_irq(unsigned int irq, void (*handler)(int, void *, struct pt_regs *),
int request_irq(unsigned int irq,
irqreturn_t (*handler)(int, void *, struct pt_regs *),
unsigned long irqflags, const char * devname, void *dev_id)
{
struct irqaction *action;
......@@ -218,16 +219,9 @@ int request_irq(unsigned int irq, void (*handler)(int, void *, struct pt_regs *)
if (irq >= NR_IRQS)
return -EINVAL;
if (!handler)
{
/*
* free_irq() used to be implemented as a call to
* request_irq() with handler being NULL. Now we have
* a real free_irq() but need to allow the old behavior
* for old code that hasn't caught up yet.
* -- Cort <cort@fsmlabs.com>
*/
free_irq(irq, dev_id);
if (!handler) {
printk(KERN_ERR "request_irq called with NULL handler!\n");
dump_stack();
return 0;
}
......@@ -246,8 +240,7 @@ int request_irq(unsigned int irq, void (*handler)(int, void *, struct pt_regs *)
action->next = NULL;
retval = setup_irq(irq, action);
if (retval)
{
if (retval) {
kfree(action);
return retval;
}
......@@ -732,6 +725,7 @@ void init_irq_proc (void)
}
}
void no_action(int irq, void *dev, struct pt_regs *regs)
irqreturn_t no_action(int irq, void *dev, struct pt_regs *regs)
{
return IRQ_NONE;
}
......@@ -189,10 +189,11 @@ psurge_smp_message_recv(struct pt_regs *regs)
smp_message_recv(msg, regs);
}
void __pmac
irqreturn_t __pmac
psurge_primary_intr(int irq, void *d, struct pt_regs *regs)
{
psurge_smp_message_recv(regs);
return IRQ_HANDLED;
}
static void __pmac
......
......@@ -850,7 +850,7 @@ prep_res_calibrate_decr(void)
static volatile int calibrate_steps __initdata = 3;
static unsigned tbstamp __initdata = 0;
static void __init
static irqreturn_t __init
prep_calibrate_decr_handler(int irq, void *dev, struct pt_regs *regs)
{
unsigned long t, freq;
......@@ -866,6 +866,7 @@ prep_calibrate_decr_handler(int irq, void *dev, struct pt_regs *regs)
tb_ticks_per_jiffy = freq / HZ;
tb_to_us = mulhwu_scale_factor(freq, 1000000);
}
return IRQ_HANDLED;
}
static void __init
......
......@@ -821,9 +821,10 @@ static void openpic_end_ipi(unsigned int irq_nr)
{
}
static void openpic_ipi_action(int cpl, void *dev_id, struct pt_regs *regs)
static irqreturn_t openpic_ipi_action(int cpl, void *dev_id, struct pt_regs *regs)
{
smp_message_recv(cpl-OPENPIC_VEC_IPI-open_pic_irq_offset, regs);
return IRQ_HANDLED;
}
#endif /* CONFIG_SMP */
......
......@@ -168,7 +168,8 @@ void mbx_i8259_action(int cpl, void *dev_id, struct pt_regs *regs)
* drivers that may mess up the internal interrupt controllers, and also
* allow them to run without modification on the MBX.
*/
int request_irq(unsigned int irq, void (*handler)(int, void *, struct pt_regs *),
int request_irq(unsigned int irq,
irqreturn_t (*handler)(int, void *, struct pt_regs *),
unsigned long irqflags, const char * devname, void *dev_id)
{
......
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