mISDN: Fix wrong struct name in macro and clarifications
authorKarsten Keil <keil@b1-systems.de>
Mon, 27 Jul 2009 15:20:55 +0000 (08:20 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 27 Jul 2009 15:20:55 +0000 (08:20 -0700)
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>
drivers/isdn/hardware/mISDN/iohelper.h
drivers/isdn/hardware/mISDN/ipac.h
drivers/isdn/hardware/mISDN/isar.h

index c16a217301e81676a6f042af018d6a6ff32b340c..b438981107ae9b7f06e5c5481678173197de6b4b 100644 (file)
@@ -26,9 +26,9 @@
 #ifndef _IOHELPER_H
 #define _IOHELPER_H
 
-typedef        u8      (read_reg_t)(void *, u8);
-typedef        void    (write_reg_t)(void *, u8, u8);
-typedef        void    (fifo_func_t)(void *, u8, u8 *, int);
+typedef        u8      (read_reg_func)(void *hwp, u8 offset);
+typedef        void    (write_reg_func)(void *hwp, u8 offset, u8 value);
+typedef        void    (fifo_func)(void *hwp, u8 offset, u8 *datap, int size);
 
 struct _ioport {
        u32     port;
@@ -90,7 +90,7 @@ struct _ioport {
                        *dp++ = readb(((typ *)hw->adr) + off);\
        } \
        static void WriteFiFo##name##_MIO(void *p, u8 off, u8 *dp, int size) {\
-               struct inf_hw *hw = p;\
+               struct hws *hw = p;\
                while (size--)\
                        writeb(*dp++, ((typ *)hw->adr) + off);\
        }
@@ -106,4 +106,4 @@ struct _ioport {
        ASSIGN_FUNC(typ, IPAC, target);\
        } while (0)
 
-#endif
\ No newline at end of file
+#endif
index f9601d55dbcaaca40ab744cf7b3107050ef3594b..74a6ccf9065c0bbd0964ca7f451b9516c11622e4 100644 (file)
@@ -30,10 +30,10 @@ struct isac_hw {
        u32                     off;            /* offset to isac regs */
        char                    *name;
        spinlock_t              *hwlock;        /* lock HW acccess */
-       read_reg_t              *read_reg;
-       write_reg_t             *write_reg;
-       fifo_func_t             *read_fifo;
-       fifo_func_t             *write_fifo;
+       read_reg_func           *read_reg;
+       write_reg_func          *write_reg;
+       fifo_func               *read_fifo;
+       fifo_func               *write_fifo;
        int                     (*monitor)(void *, u32, u8 *, int);
        void                    (*release)(struct isac_hw *);
        int                     (*init)(struct isac_hw *);
@@ -73,10 +73,10 @@ struct ipac_hw {
        spinlock_t              *hwlock;        /* lock HW acccess */
        struct module           *owner;
        u32                     type;
-       read_reg_t              *read_reg;
-       write_reg_t             *write_reg;
-       fifo_func_t             *read_fifo;
-       fifo_func_t             *write_fifo;
+       read_reg_func           *read_reg;
+       write_reg_func          *write_reg;
+       fifo_func               *read_fifo;
+       fifo_func               *write_fifo;
        void                    (*release)(struct ipac_hw *);
        int                     (*init)(struct ipac_hw *);
        int                     (*ctrl)(struct ipac_hw *, u32, u_long);
index 092351acd2ab48a874305afc525593fe52b2258a..4a134acd44d011c7ec3e178a9c73d61fa4e9da6f 100644 (file)
@@ -47,10 +47,10 @@ struct isar_hw {
        spinlock_t      *hwlock;        /* lock HW acccess */
        char            *name;
        struct module   *owner;
-       read_reg_t      *read_reg;
-       write_reg_t     *write_reg;
-       fifo_func_t     *read_fifo;
-       fifo_func_t     *write_fifo;
+       read_reg_func   *read_reg;
+       write_reg_func  *write_reg;
+       fifo_func       *read_fifo;
+       fifo_func       *write_fifo;
        int             (*ctrl)(void *, u32, u_long);
        void            (*release)(struct isar_hw *);
        int             (*init)(struct isar_hw *);