Commit a2106182 authored by Manfred Spraul's avatar Manfred Spraul Committed by Linus Torvalds

[PATCH] drivers/pcmcia/i8???.c

- function prototypes for request_irq were missing
- after including <linux/interrupt.h>, I got an error due to
  a conflict with the 'irq_count()' macro and the irq_count
  function. Rename to i385_count_irq
parent 420c1fb7
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/workqueue.h> #include <linux/workqueue.h>
#include <linux/interrupt.h>
#include <pcmcia/cs_types.h> #include <pcmcia/cs_types.h>
#include <pcmcia/ss.h> #include <pcmcia/ss.h>
......
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/proc_fs.h> #include <linux/proc_fs.h>
#include <linux/workqueue.h> #include <linux/workqueue.h>
#include <linux/interrupt.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/bitops.h> #include <asm/bitops.h>
...@@ -76,12 +77,12 @@ static const char *version = ...@@ -76,12 +77,12 @@ static const char *version =
#define DEBUG(n, args...) do { } while (0) #define DEBUG(n, args...) do { } while (0)
#endif #endif
static void irq_count(int, void *, struct pt_regs *); static void i365_count_irq(int, void *, struct pt_regs *);
static inline int _check_irq(int irq, int flags) static inline int _check_irq(int irq, int flags)
{ {
if (request_irq(irq, irq_count, flags, "x", irq_count) != 0) if (request_irq(irq, i365_count_irq, flags, "x", i365_count_irq) != 0)
return -1; return -1;
free_irq(irq, irq_count); free_irq(irq, i365_count_irq);
return 0; return 0;
} }
...@@ -533,7 +534,7 @@ static u_int __init set_bridge_opts(u_short s, u_short ns) ...@@ -533,7 +534,7 @@ static u_int __init set_bridge_opts(u_short s, u_short ns)
static volatile u_int irq_hits; static volatile u_int irq_hits;
static u_short irq_sock; static u_short irq_sock;
static void irq_count(int irq, void *dev, struct pt_regs *regs) static void i365_count_irq(int irq, void *dev, struct pt_regs *regs)
{ {
i365_get(irq_sock, I365_CSC); i365_get(irq_sock, I365_CSC);
irq_hits++; irq_hits++;
...@@ -543,13 +544,13 @@ static void irq_count(int irq, void *dev, struct pt_regs *regs) ...@@ -543,13 +544,13 @@ static void irq_count(int irq, void *dev, struct pt_regs *regs)
static u_int __init test_irq(u_short sock, int irq) static u_int __init test_irq(u_short sock, int irq)
{ {
DEBUG(2, " testing ISA irq %d\n", irq); DEBUG(2, " testing ISA irq %d\n", irq);
if (request_irq(irq, irq_count, 0, "scan", irq_count) != 0) if (request_irq(irq, i365_count_irq, 0, "scan", i365_count_irq) != 0)
return 1; return 1;
irq_hits = 0; irq_sock = sock; irq_hits = 0; irq_sock = sock;
__set_current_state(TASK_UNINTERRUPTIBLE); __set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(HZ/100); schedule_timeout(HZ/100);
if (irq_hits) { if (irq_hits) {
free_irq(irq, irq_count); free_irq(irq, i365_count_irq);
DEBUG(2, " spurious hit!\n"); DEBUG(2, " spurious hit!\n");
return 1; return 1;
} }
...@@ -559,7 +560,7 @@ static u_int __init test_irq(u_short sock, int irq) ...@@ -559,7 +560,7 @@ static u_int __init test_irq(u_short sock, int irq)
i365_bset(sock, I365_GENCTL, I365_CTL_SW_IRQ); i365_bset(sock, I365_GENCTL, I365_CTL_SW_IRQ);
udelay(1000); udelay(1000);
free_irq(irq, irq_count); free_irq(irq, i365_count_irq);
/* mask all interrupts */ /* mask all interrupts */
i365_set(sock, I365_CSCINT, 0); i365_set(sock, I365_CSCINT, 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