Commit 353684c0 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Linus Torvalds

[PATCH] M68k IRQ API updates [1/20]

M68k core: Update to the new irq API (from Roman Zippel and me) [1/20]
parent 20629147
......@@ -60,14 +60,14 @@ static irq_node_t nodes[NUM_IRQ_NODES];
static void dummy_enable_irq(unsigned int irq);
static void dummy_disable_irq(unsigned int irq);
static int dummy_request_irq(unsigned int irq,
void (*handler) (int, void *, struct pt_regs *),
irqreturn_t (*handler) (int, void *, struct pt_regs *),
unsigned long flags, const char *devname, void *dev_id);
static void dummy_free_irq(unsigned int irq, void *dev_id);
void (*enable_irq) (unsigned int) = dummy_enable_irq;
void (*disable_irq) (unsigned int) = dummy_disable_irq;
int (*mach_request_irq) (unsigned int, void (*)(int, void *, struct pt_regs *),
int (*mach_request_irq) (unsigned int, irqreturn_t (*)(int, void *, struct pt_regs *),
unsigned long, const char *, void *) = dummy_request_irq;
void (*mach_free_irq) (unsigned int, void *) = dummy_free_irq;
......@@ -121,7 +121,7 @@ irq_node_t *new_irq_node(void)
* include/asm/irq.h.
*/
int request_irq(unsigned int irq,
void (*handler) (int, void *, struct pt_regs *),
irqreturn_t (*handler) (int, void *, struct pt_regs *),
unsigned long flags, const char *devname, void *dev_id)
{
return mach_request_irq(irq, handler, flags, devname, dev_id);
......@@ -133,7 +133,7 @@ void free_irq(unsigned int irq, void *dev_id)
}
int sys_request_irq(unsigned int irq,
void (*handler)(int, void *, struct pt_regs *),
irqreturn_t (*handler)(int, void *, struct pt_regs *),
unsigned long flags, const char *devname, void *dev_id)
{
if (irq < IRQ1 || irq > IRQ7) {
......@@ -215,7 +215,7 @@ static void dummy_disable_irq(unsigned int irq)
}
static int dummy_request_irq(unsigned int irq,
void (*handler) (int, void *, struct pt_regs *),
irqreturn_t (*handler) (int, void *, struct pt_regs *),
unsigned long flags, const char *devname, void *dev_id)
{
printk("calling uninitialized request_irq()\n");
......
......@@ -67,14 +67,14 @@ char saved_command_line[CL_SIZE];
char m68k_debug_device[6] = "";
void (*mach_sched_init) (void (*handler)(int, void *, struct pt_regs *)) __initdata = NULL;
void (*mach_sched_init) (irqreturn_t (*handler)(int, void *, struct pt_regs *)) __initdata = NULL;
/* machine dependent irq functions */
void (*mach_init_IRQ) (void) __initdata = NULL;
void (*(*mach_default_handler)[]) (int, void *, struct pt_regs *) = NULL;
irqreturn_t (*(*mach_default_handler)[]) (int, void *, struct pt_regs *) = NULL;
void (*mach_get_model) (char *model) = NULL;
int (*mach_get_hardware_list) (char *buffer) = NULL;
int (*mach_get_irq_list) (struct seq_file *, void *) = NULL;
void (*mach_process_int) (int, struct pt_regs *) = NULL;
irqreturn_t (*mach_process_int) (int, struct pt_regs *) = NULL;
/* machine dependent timer functions */
unsigned long (*mach_gettimeoffset) (void);
int (*mach_hwclk) (int, struct rtc_time*) = NULL;
......
......@@ -57,7 +57,7 @@ static inline void do_profile (unsigned long pc)
* timer_interrupt() needs to keep up the real-time clock,
* as well as call the "do_timer()" routine every clocktick
*/
static void timer_interrupt(int irq, void *dummy, struct pt_regs * regs)
static irqreturn_t timer_interrupt(int irq, void *dummy, struct pt_regs * regs)
{
do_timer(regs);
......@@ -87,6 +87,7 @@ static void timer_interrupt(int irq, void *dummy, struct pt_regs * regs)
}
}
#endif /* CONFIG_HEARTBEAT */
return IRQ_HANDLED;
}
void time_init(void)
......
......@@ -2,6 +2,7 @@
#define _M68K_IRQ_H_
#include <linux/config.h>
#include <linux/interrupt.h>
/*
* # of m68k interrupts
......@@ -76,7 +77,7 @@ extern void (*disable_irq)(unsigned int);
struct pt_regs;
extern int sys_request_irq(unsigned int,
void (*)(int, void *, struct pt_regs *),
irqreturn_t (*)(int, void *, struct pt_regs *),
unsigned long, const char *, void *);
extern void sys_free_irq(unsigned int, void *);
......@@ -98,7 +99,7 @@ extern void sys_free_irq(unsigned int, void *);
* interrupt source (if it supports chaining).
*/
typedef struct irq_node {
void (*handler)(int, void *, struct pt_regs *);
irqreturn_t (*handler)(int, void *, struct pt_regs *);
unsigned long flags;
void *dev_id;
const char *devname;
......@@ -109,7 +110,7 @@ typedef struct irq_node {
* This structure has only 4 elements for speed reasons
*/
typedef struct irq_handler {
void (*handler)(int, void *, struct pt_regs *);
irqreturn_t (*handler)(int, void *, struct pt_regs *);
unsigned long flags;
void *dev_id;
const char *devname;
......
......@@ -2,6 +2,7 @@
#define _M68K_MACHDEP_H
#include <linux/seq_file.h>
#include <linux/interrupt.h>
struct pt_regs;
struct mktime;
......@@ -9,17 +10,17 @@ struct rtc_time;
struct rtc_pll_info;
struct buffer_head;
extern void (*mach_sched_init) (void (*handler)(int, void *, struct pt_regs *));
extern void (*mach_sched_init) (irqreturn_t (*handler)(int, void *, struct pt_regs *));
/* machine dependent irq functions */
extern void (*mach_init_IRQ) (void);
extern void (*(*mach_default_handler)[]) (int, void *, struct pt_regs *);
extern int (*mach_request_irq) (unsigned int irq, void (*handler)(int, void *, struct pt_regs *),
extern irqreturn_t (*(*mach_default_handler)[]) (int, void *, struct pt_regs *);
extern int (*mach_request_irq) (unsigned int irq, irqreturn_t (*handler)(int, void *, struct pt_regs *),
unsigned long flags, const char *devname, void *dev_id);
extern void (*mach_free_irq) (unsigned int irq, void *dev_id);
extern void (*mach_get_model) (char *model);
extern int (*mach_get_hardware_list) (char *buffer);
extern int (*mach_get_irq_list) (struct seq_file *p, void *v);
extern void (*mach_process_int) (int irq, struct pt_regs *fp);
extern irqreturn_t (*mach_process_int) (int irq, struct pt_regs *fp);
/* machine dependent timer functions */
extern unsigned long (*mach_gettimeoffset)(void);
extern int (*mach_hwclk)(int, struct rtc_time*);
......
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