diff options
author | Karsten Keil <keil@b1-systems.de> | 2009-07-27 11:20:55 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-07-27 11:20:55 -0400 |
commit | 663a31ce5bbef2d14fa325023e48bf02b4249f27 (patch) | |
tree | b1b0d69da31cad32b886f4db5ddd0a746026b2a9 /drivers/isdn/hardware | |
parent | 70034918930d2e5b68c09bced637228c50d9561a (diff) |
mISDN: Fix wrong struct name in macro and clarifications
Based on comments from Joe Perches <joe@perches.com>. Thanks.
Fix IOFUNC_MEMIO macro. WriteFiFo##name##_MIO use the wrong struct name,
this was missed because the macro was only called with this name.
Clarify with _func that the defined types are functions.
Add names to the parameters for better understanding the purpose.
Signed-off-by: Karsten Keil <keil@b1-systems.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn/hardware')
-rw-r--r-- | drivers/isdn/hardware/mISDN/iohelper.h | 10 | ||||
-rw-r--r-- | drivers/isdn/hardware/mISDN/ipac.h | 16 | ||||
-rw-r--r-- | drivers/isdn/hardware/mISDN/isar.h | 8 |
3 files changed, 17 insertions, 17 deletions
diff --git a/drivers/isdn/hardware/mISDN/iohelper.h b/drivers/isdn/hardware/mISDN/iohelper.h index c16a217301e8..b438981107ae 100644 --- a/drivers/isdn/hardware/mISDN/iohelper.h +++ b/drivers/isdn/hardware/mISDN/iohelper.h | |||
@@ -26,9 +26,9 @@ | |||
26 | #ifndef _IOHELPER_H | 26 | #ifndef _IOHELPER_H |
27 | #define _IOHELPER_H | 27 | #define _IOHELPER_H |
28 | 28 | ||
29 | typedef u8 (read_reg_t)(void *, u8); | 29 | typedef u8 (read_reg_func)(void *hwp, u8 offset); |
30 | typedef void (write_reg_t)(void *, u8, u8); | 30 | typedef void (write_reg_func)(void *hwp, u8 offset, u8 value); |
31 | typedef void (fifo_func_t)(void *, u8, u8 *, int); | 31 | typedef void (fifo_func)(void *hwp, u8 offset, u8 *datap, int size); |
32 | 32 | ||
33 | struct _ioport { | 33 | struct _ioport { |
34 | u32 port; | 34 | u32 port; |
@@ -90,7 +90,7 @@ struct _ioport { | |||
90 | *dp++ = readb(((typ *)hw->adr) + off);\ | 90 | *dp++ = readb(((typ *)hw->adr) + off);\ |
91 | } \ | 91 | } \ |
92 | static void WriteFiFo##name##_MIO(void *p, u8 off, u8 *dp, int size) {\ | 92 | static void WriteFiFo##name##_MIO(void *p, u8 off, u8 *dp, int size) {\ |
93 | struct inf_hw *hw = p;\ | 93 | struct hws *hw = p;\ |
94 | while (size--)\ | 94 | while (size--)\ |
95 | writeb(*dp++, ((typ *)hw->adr) + off);\ | 95 | writeb(*dp++, ((typ *)hw->adr) + off);\ |
96 | } | 96 | } |
@@ -106,4 +106,4 @@ struct _ioport { | |||
106 | ASSIGN_FUNC(typ, IPAC, target);\ | 106 | ASSIGN_FUNC(typ, IPAC, target);\ |
107 | } while (0) | 107 | } while (0) |
108 | 108 | ||
109 | #endif \ No newline at end of file | 109 | #endif |
diff --git a/drivers/isdn/hardware/mISDN/ipac.h b/drivers/isdn/hardware/mISDN/ipac.h index f9601d55dbca..74a6ccf9065c 100644 --- a/drivers/isdn/hardware/mISDN/ipac.h +++ b/drivers/isdn/hardware/mISDN/ipac.h | |||
@@ -30,10 +30,10 @@ struct isac_hw { | |||
30 | u32 off; /* offset to isac regs */ | 30 | u32 off; /* offset to isac regs */ |
31 | char *name; | 31 | char *name; |
32 | spinlock_t *hwlock; /* lock HW acccess */ | 32 | spinlock_t *hwlock; /* lock HW acccess */ |
33 | read_reg_t *read_reg; | 33 | read_reg_func *read_reg; |
34 | write_reg_t *write_reg; | 34 | write_reg_func *write_reg; |
35 | fifo_func_t *read_fifo; | 35 | fifo_func *read_fifo; |
36 | fifo_func_t *write_fifo; | 36 | fifo_func *write_fifo; |
37 | int (*monitor)(void *, u32, u8 *, int); | 37 | int (*monitor)(void *, u32, u8 *, int); |
38 | void (*release)(struct isac_hw *); | 38 | void (*release)(struct isac_hw *); |
39 | int (*init)(struct isac_hw *); | 39 | int (*init)(struct isac_hw *); |
@@ -73,10 +73,10 @@ struct ipac_hw { | |||
73 | spinlock_t *hwlock; /* lock HW acccess */ | 73 | spinlock_t *hwlock; /* lock HW acccess */ |
74 | struct module *owner; | 74 | struct module *owner; |
75 | u32 type; | 75 | u32 type; |
76 | read_reg_t *read_reg; | 76 | read_reg_func *read_reg; |
77 | write_reg_t *write_reg; | 77 | write_reg_func *write_reg; |
78 | fifo_func_t *read_fifo; | 78 | fifo_func *read_fifo; |
79 | fifo_func_t *write_fifo; | 79 | fifo_func *write_fifo; |
80 | void (*release)(struct ipac_hw *); | 80 | void (*release)(struct ipac_hw *); |
81 | int (*init)(struct ipac_hw *); | 81 | int (*init)(struct ipac_hw *); |
82 | int (*ctrl)(struct ipac_hw *, u32, u_long); | 82 | int (*ctrl)(struct ipac_hw *, u32, u_long); |
diff --git a/drivers/isdn/hardware/mISDN/isar.h b/drivers/isdn/hardware/mISDN/isar.h index 092351acd2ab..4a134acd44d0 100644 --- a/drivers/isdn/hardware/mISDN/isar.h +++ b/drivers/isdn/hardware/mISDN/isar.h | |||
@@ -47,10 +47,10 @@ struct isar_hw { | |||
47 | spinlock_t *hwlock; /* lock HW acccess */ | 47 | spinlock_t *hwlock; /* lock HW acccess */ |
48 | char *name; | 48 | char *name; |
49 | struct module *owner; | 49 | struct module *owner; |
50 | read_reg_t *read_reg; | 50 | read_reg_func *read_reg; |
51 | write_reg_t *write_reg; | 51 | write_reg_func *write_reg; |
52 | fifo_func_t *read_fifo; | 52 | fifo_func *read_fifo; |
53 | fifo_func_t *write_fifo; | 53 | fifo_func *write_fifo; |
54 | int (*ctrl)(void *, u32, u_long); | 54 | int (*ctrl)(void *, u32, u_long); |
55 | void (*release)(struct isar_hw *); | 55 | void (*release)(struct isar_hw *); |
56 | int (*init)(struct isar_hw *); | 56 | int (*init)(struct isar_hw *); |