Commit 606cd232 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Linus Torvalds

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

M68k Atari: Update to the new irq API (from Roman Zippel and me) [4/20]
parent 701e7483
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
typedef void (*asm_irq_handler)(void); typedef void (*asm_irq_handler)(void);
struct irqhandler { struct irqhandler {
void (*handler)(int, void *, struct pt_regs *); irqreturn_t (*handler)(int, void *, struct pt_regs *);
void *dev_id; void *dev_id;
}; };
...@@ -404,12 +404,13 @@ void __init atari_init_IRQ(void) ...@@ -404,12 +404,13 @@ void __init atari_init_IRQ(void)
} }
static void atari_call_irq_list( int irq, void *dev_id, struct pt_regs *fp ) static irqreturn_t atari_call_irq_list( int irq, void *dev_id, struct pt_regs *fp )
{ {
irq_node_t *node; irq_node_t *node;
for (node = (irq_node_t *)dev_id; node; node = node->next) for (node = (irq_node_t *)dev_id; node; node = node->next)
node->handler(irq, node->dev_id, fp); node->handler(irq, node->dev_id, fp);
return IRQ_HANDLED;
} }
...@@ -419,7 +420,7 @@ static void atari_call_irq_list( int irq, void *dev_id, struct pt_regs *fp ) ...@@ -419,7 +420,7 @@ static void atari_call_irq_list( int irq, void *dev_id, struct pt_regs *fp )
* If the addition was successful, it returns 0. * If the addition was successful, it returns 0.
*/ */
int atari_request_irq(unsigned int irq, void (*handler)(int, void *, struct pt_regs *), int atari_request_irq(unsigned int irq, irqreturn_t (*handler)(int, void *, struct pt_regs *),
unsigned long flags, const char *devname, void *dev_id) unsigned long flags, const char *devname, void *dev_id)
{ {
int vector; int vector;
......
...@@ -60,7 +60,7 @@ static int atari_get_hardware_list(char *buffer); ...@@ -60,7 +60,7 @@ static int atari_get_hardware_list(char *buffer);
/* atari specific irq functions */ /* atari specific irq functions */
extern void atari_init_IRQ (void); extern void atari_init_IRQ (void);
extern int atari_request_irq (unsigned int irq, void (*handler)(int, void *, struct pt_regs *), extern int atari_request_irq (unsigned int irq, irqreturn_t (*handler)(int, void *, struct pt_regs *),
unsigned long flags, const char *devname, void *dev_id); unsigned long flags, const char *devname, void *dev_id);
extern void atari_free_irq (unsigned int irq, void *dev_id); extern void atari_free_irq (unsigned int irq, void *dev_id);
extern void atari_enable_irq (unsigned int); extern void atari_enable_irq (unsigned int);
...@@ -72,7 +72,7 @@ static void atari_heartbeat( int on ); ...@@ -72,7 +72,7 @@ static void atari_heartbeat( int on );
#endif #endif
/* atari specific timer functions (in time.c) */ /* atari specific timer functions (in time.c) */
extern void atari_sched_init(void (*)(int, void *, struct pt_regs *)); extern void atari_sched_init(irqreturn_t (*)(int, void *, struct pt_regs *));
extern unsigned long atari_gettimeoffset (void); extern unsigned long atari_gettimeoffset (void);
extern int atari_mste_hwclk (int, struct rtc_time *); extern int atari_mste_hwclk (int, struct rtc_time *);
extern int atari_tt_hwclk (int, struct rtc_time *); extern int atari_tt_hwclk (int, struct rtc_time *);
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
static int stdma_locked = 0; /* the semaphore */ static int stdma_locked = 0; /* the semaphore */
/* int func to be called */ /* int func to be called */
static void (*stdma_isr)(int, void *, struct pt_regs *) = NULL; static irqreturn_t (*stdma_isr)(int, void *, struct pt_regs *) = NULL;
static void *stdma_isr_data = NULL; /* data passed to isr */ static void *stdma_isr_data = NULL; /* data passed to isr */
static DECLARE_WAIT_QUEUE_HEAD(stdma_wait); /* wait queue for ST-DMA */ static DECLARE_WAIT_QUEUE_HEAD(stdma_wait); /* wait queue for ST-DMA */
...@@ -52,7 +52,7 @@ static DECLARE_WAIT_QUEUE_HEAD(stdma_wait); /* wait queue for ST-DMA */ ...@@ -52,7 +52,7 @@ static DECLARE_WAIT_QUEUE_HEAD(stdma_wait); /* wait queue for ST-DMA */
/***************************** Prototypes *****************************/ /***************************** Prototypes *****************************/
static void stdma_int (int irq, void *dummy, struct pt_regs *fp); static irqreturn_t stdma_int (int irq, void *dummy, struct pt_regs *fp);
/************************* End of Prototypes **************************/ /************************* End of Prototypes **************************/
...@@ -74,7 +74,8 @@ static void stdma_int (int irq, void *dummy, struct pt_regs *fp); ...@@ -74,7 +74,8 @@ static void stdma_int (int irq, void *dummy, struct pt_regs *fp);
* *
*/ */
void stdma_lock(void (*handler)(int, void *, struct pt_regs *), void *data) void stdma_lock(irqreturn_t (*handler)(int, void *, struct pt_regs *),
void *data)
{ {
unsigned long flags; unsigned long flags;
...@@ -187,8 +188,9 @@ void __init stdma_init(void) ...@@ -187,8 +188,9 @@ void __init stdma_init(void)
* *
*/ */
static void stdma_int(int irq, void *dummy, struct pt_regs *fp) static irqreturn_t stdma_int(int irq, void *dummy, struct pt_regs *fp)
{ {
if (stdma_isr) if (stdma_isr)
(*stdma_isr)(irq, stdma_isr_data, fp); (*stdma_isr)(irq, stdma_isr_data, fp);
return IRQ_HANDLED;
} }
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#include <asm/rtc.h> #include <asm/rtc.h>
void __init void __init
atari_sched_init(void (*timer_routine)(int, void *, struct pt_regs *)) atari_sched_init(irqreturn_t (*timer_routine)(int, void *, struct pt_regs *))
{ {
/* set Timer C data Register */ /* set Timer C data Register */
mfp.tim_dt_c = INT_TICKS; mfp.tim_dt_c = INT_TICKS;
......
...@@ -8,7 +8,8 @@ ...@@ -8,7 +8,8 @@
/***************************** Prototypes *****************************/ /***************************** Prototypes *****************************/
void stdma_lock(void (*handler)(int, void *, struct pt_regs *), void *data); void stdma_lock(irqreturn_t (*handler)(int, void *, struct pt_regs *),
void *data);
void stdma_release( void ); void stdma_release( void );
int stdma_others_waiting( void ); int stdma_others_waiting( void );
int stdma_islocked( void ); int stdma_islocked( void );
......
...@@ -161,7 +161,8 @@ static __inline__ void ide_release_lock (void) ...@@ -161,7 +161,8 @@ static __inline__ void ide_release_lock (void)
} }
} }
static __inline__ void ide_get_lock(void (*handler)(int, void *, struct pt_regs *), void *data) static __inline__ void
ide_get_lock(irqreturn_t (*handler)(int, void *, struct pt_regs *), void *data)
{ {
if (MACH_IS_ATARI) { if (MACH_IS_ATARI) {
if (falconide_intr_lock == 0) { if (falconide_intr_lock == 0) {
......
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