aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/rio/linux_compat.h
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2006-03-24 06:18:26 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-24 10:33:29 -0500
commit27c6e526f34760a9c48a90112242b7165064fa85 (patch)
tree40505dbe2ab69e7f8077c7473984deecff0203f3 /drivers/char/rio/linux_compat.h
parentb6c6b6021ec735bd105e130ac1ee1606575f74c3 (diff)
[PATCH] rio driver rework continued #1
More header cleanups, strip out typedefs and remove cruft. There are a lot of magic macros that can go and also a great deal of abuse of volatile that is not needed any more as this patch set cleans up the misuse of pointer access to ISA and PCI space. It now builds cleanly on 64bit, although there is more work left to do Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/rio/linux_compat.h')
-rw-r--r--drivers/char/rio/linux_compat.h41
1 files changed, 1 insertions, 40 deletions
diff --git a/drivers/char/rio/linux_compat.h b/drivers/char/rio/linux_compat.h
index 17a14c4a3420..ebbe3ea873e8 100644
--- a/drivers/char/rio/linux_compat.h
+++ b/drivers/char/rio/linux_compat.h
@@ -19,56 +19,16 @@
19#include <linux/interrupt.h> 19#include <linux/interrupt.h>
20 20
21 21
22#define disable(oldspl) save_flags (oldspl)
23#define restore(oldspl) restore_flags (oldspl)
24
25#define sysbrk(x) kmalloc ((x),in_interrupt()? GFP_ATOMIC : GFP_KERNEL)
26#define sysfree(p,size) kfree ((p))
27
28#define WBYTE(p,v) writeb(v, &p)
29#define RBYTE(p) readb (&p)
30#define WWORD(p,v) writew(v, &p)
31#define RWORD(p) readw(&p)
32#define WINDW(p,v) writew(v, p)
33#define RINDW(p) readw(p)
34
35#define DEBUG_ALL 22#define DEBUG_ALL
36 23
37#define cprintf printk
38
39#ifdef __KERNEL__
40#define INKERNEL
41#endif
42
43struct ttystatics { 24struct ttystatics {
44 struct termios tm; 25 struct termios tm;
45}; 26};
46 27
47#define bzero(d, n) memset((d), 0, (n))
48#define bcopy(src, dest, n) memcpy ((dest), (src), (n)) 28#define bcopy(src, dest, n) memcpy ((dest), (src), (n))
49 29
50#define SEM_SIGIGNORE 0x1234 30#define SEM_SIGIGNORE 0x1234
51 31
52#ifdef DEBUG_SEM
53#define swait(a,b) printk ("waiting: " __FILE__ " line %d\n", __LINE__)
54#define ssignal(sem) printk ("signalling: " __FILE__ " line %d\n", __LINE__)
55
56#define sreset(sem) printk ("sreset: " __FILE__ "\n")
57#define sem_init(sem,v) printk ("sreset: " __FILE__ "\n")
58#endif
59
60
61#define getpid() (current->pid)
62
63#define QSIZE SERIAL_XMIT_SIZE
64
65#define pseterr(errno) return (- errno)
66
67#define V_CBAUD CBAUD
68
69/* For one reason or another rioboot.c uses delay instead of RIODelay. */
70#define delay(x,y) RIODelay(NULL, y)
71
72extern int rio_debug; 32extern int rio_debug;
73 33
74#define RIO_DEBUG_INIT 0x000001 34#define RIO_DEBUG_INIT 0x000001
@@ -91,6 +51,7 @@ extern int rio_debug;
91#define RIO_DEBUG_DELAY 0x020000 51#define RIO_DEBUG_DELAY 0x020000
92#define RIO_DEBUG_MOD_COUNT 0x040000 52#define RIO_DEBUG_MOD_COUNT 0x040000
93 53
54
94/* Copied over from riowinif.h . This is ugly. The winif file declares 55/* Copied over from riowinif.h . This is ugly. The winif file declares
95also much other stuff which is incompatible with the headers from 56also much other stuff which is incompatible with the headers from
96the older driver. The older driver includes "brates.h" which shadows 57the older driver. The older driver includes "brates.h" which shadows