summaryrefslogtreecommitdiff
path: root/drivers/isdn/hardware/eicon/platform.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/isdn/hardware/eicon/platform.h')
-rw-r--r--drivers/isdn/hardware/eicon/platform.h156
1 files changed, 78 insertions, 78 deletions
diff --git a/drivers/isdn/hardware/eicon/platform.h b/drivers/isdn/hardware/eicon/platform.h
index 15d4942de53b..7331c3b14a5f 100644
--- a/drivers/isdn/hardware/eicon/platform.h
+++ b/drivers/isdn/hardware/eicon/platform.h
@@ -1,10 +1,10 @@
/* $Id: platform.h,v 1.37.4.6 2005/01/31 12:22:20 armin Exp $
*
* platform.h
- *
+ *
*
* Copyright 2000-2003 by Armin Schindler (mac@melware.de)
- * Copyright 2000 Eicon Networks
+ * Copyright 2000 Eicon Networks
*
* This software may be used and distributed according to the terms
* of the GNU General Public License, incorporated herein by reference.
@@ -112,40 +112,40 @@
#define DIVA_OS_MEM_ATTACH_CONFIG(a) ((a)->Config)
#define DIVA_OS_MEM_ATTACH_CONTROL(a) ((a)->Control)
-#define DIVA_OS_MEM_DETACH_RAM(a, x) do { } while(0)
-#define DIVA_OS_MEM_DETACH_PORT(a, x) do { } while(0)
-#define DIVA_OS_MEM_DETACH_PROM(a, x) do { } while(0)
-#define DIVA_OS_MEM_DETACH_CTLREG(a, x) do { } while(0)
-#define DIVA_OS_MEM_DETACH_RESET(a, x) do { } while(0)
-#define DIVA_OS_MEM_DETACH_CFG(a, x) do { } while(0)
-#define DIVA_OS_MEM_DETACH_ADDRESS(a, x) do { } while(0)
-#define DIVA_OS_MEM_DETACH_CONFIG(a, x) do { } while(0)
-#define DIVA_OS_MEM_DETACH_CONTROL(a, x) do { } while(0)
+#define DIVA_OS_MEM_DETACH_RAM(a, x) do { } while (0)
+#define DIVA_OS_MEM_DETACH_PORT(a, x) do { } while (0)
+#define DIVA_OS_MEM_DETACH_PROM(a, x) do { } while (0)
+#define DIVA_OS_MEM_DETACH_CTLREG(a, x) do { } while (0)
+#define DIVA_OS_MEM_DETACH_RESET(a, x) do { } while (0)
+#define DIVA_OS_MEM_DETACH_CFG(a, x) do { } while (0)
+#define DIVA_OS_MEM_DETACH_ADDRESS(a, x) do { } while (0)
+#define DIVA_OS_MEM_DETACH_CONFIG(a, x) do { } while (0)
+#define DIVA_OS_MEM_DETACH_CONTROL(a, x) do { } while (0)
#define DIVA_INVALID_FILE_HANDLE ((dword)(-1))
-#define DIVAS_CONTAINING_RECORD(address, type, field) \
- ((type *)((char*)(address) - (char*)(&((type *)0)->field)))
+#define DIVAS_CONTAINING_RECORD(address, type, field) \
+ ((type *)((char *)(address) - (char *)(&((type *)0)->field)))
-extern int sprintf(char *, const char*, ...);
+extern int sprintf(char *, const char *, ...);
-typedef void* LIST_ENTRY;
+typedef void *LIST_ENTRY;
-typedef char DEVICE_NAME[64];
-typedef struct _ISDN_ADAPTER ISDN_ADAPTER;
-typedef struct _ISDN_ADAPTER* PISDN_ADAPTER;
+typedef char DEVICE_NAME[64];
+typedef struct _ISDN_ADAPTER ISDN_ADAPTER;
+typedef struct _ISDN_ADAPTER *PISDN_ADAPTER;
-typedef void (* DIVA_DI_PRINTF) (unsigned char *, ...);
+typedef void (*DIVA_DI_PRINTF)(unsigned char *, ...);
#include "debuglib.h"
#define dtrc(p) DBG_PRV0(p)
-#define dbug(a,p) DBG_PRV1(p)
+#define dbug(a, p) DBG_PRV1(p)
-typedef struct e_info_s E_INFO ;
+typedef struct e_info_s E_INFO;
typedef char diva_os_dependent_devica_name_t[64];
-typedef void* PDEVICE_OBJECT;
+typedef void *PDEVICE_OBJECT;
struct _diva_os_soft_isr;
struct _diva_os_timer;
@@ -156,13 +156,13 @@ void diva_log_info(unsigned char *, ...);
/*
** XDI DIDD Interface
*/
-void diva_xdi_didd_register_adapter (int card);
-void diva_xdi_didd_remove_adapter (int card);
+void diva_xdi_didd_register_adapter(int card);
+void diva_xdi_didd_remove_adapter(int card);
/*
** memory allocation
*/
-static __inline__ void* diva_os_malloc (unsigned long flags, unsigned long size)
+static __inline__ void *diva_os_malloc(unsigned long flags, unsigned long size)
{
void *ret = NULL;
@@ -171,7 +171,7 @@ static __inline__ void* diva_os_malloc (unsigned long flags, unsigned long size)
}
return (ret);
}
-static __inline__ void diva_os_free (unsigned long flags, void* ptr)
+static __inline__ void diva_os_free(unsigned long flags, void *ptr)
{
vfree(ptr);
}
@@ -200,34 +200,34 @@ static __inline__ void diva_os_wait(dword mSec)
/*
** PCI Configuration space access
*/
-void PCIwrite (byte bus, byte func, int offset, void* data, int length, void* pci_dev_handle);
-void PCIread (byte bus, byte func, int offset, void* data, int length, void* pci_dev_handle);
+void PCIwrite(byte bus, byte func, int offset, void *data, int length, void *pci_dev_handle);
+void PCIread(byte bus, byte func, int offset, void *data, int length, void *pci_dev_handle);
/*
** I/O Port utilities
*/
-int diva_os_register_io_port (void *adapter, int register, unsigned long port,
- unsigned long length, const char* name, int id);
+int diva_os_register_io_port(void *adapter, int register, unsigned long port,
+ unsigned long length, const char *name, int id);
/*
** I/O port access abstraction
*/
-byte inpp (void __iomem *);
-word inppw (void __iomem *);
-void inppw_buffer (void __iomem *, void*, int);
-void outppw (void __iomem *, word);
-void outppw_buffer (void __iomem * , void*, int);
-void outpp (void __iomem *, word);
+byte inpp(void __iomem *);
+word inppw(void __iomem *);
+void inppw_buffer(void __iomem *, void *, int);
+void outppw(void __iomem *, word);
+void outppw_buffer(void __iomem * , void*, int);
+void outpp(void __iomem *, word);
/*
-** IRQ
+** IRQ
*/
typedef struct _diva_os_adapter_irq_info {
- byte irq_nr;
- int registered;
- char irq_name[24];
+ byte irq_nr;
+ int registered;
+ char irq_name[24];
} diva_os_adapter_irq_info_t;
-int diva_os_register_irq (void* context, byte irq, const char* name);
-void diva_os_remove_irq (void* context, byte irq);
+int diva_os_register_irq(void *context, byte irq, const char *name);
+void diva_os_remove_irq(void *context, byte irq);
#define diva_os_in_irq() in_irq()
@@ -236,58 +236,58 @@ void diva_os_remove_irq (void* context, byte irq);
*/
typedef long diva_os_spin_lock_magic_t;
typedef spinlock_t diva_os_spin_lock_t;
-static __inline__ int diva_os_initialize_spin_lock (spinlock_t *lock, void * unused) { \
- spin_lock_init (lock); return(0); }
-static __inline__ void diva_os_enter_spin_lock (diva_os_spin_lock_t* a, \
- diva_os_spin_lock_magic_t* old_irql, \
- void* dbg) { spin_lock_bh(a); }
-static __inline__ void diva_os_leave_spin_lock (diva_os_spin_lock_t* a, \
- diva_os_spin_lock_magic_t* old_irql, \
- void* dbg) { spin_unlock_bh(a); }
+static __inline__ int diva_os_initialize_spin_lock(spinlock_t *lock, void *unused) { \
+ spin_lock_init(lock); return (0); }
+static __inline__ void diva_os_enter_spin_lock(diva_os_spin_lock_t *a, \
+ diva_os_spin_lock_magic_t *old_irql, \
+ void *dbg) { spin_lock_bh(a); }
+static __inline__ void diva_os_leave_spin_lock(diva_os_spin_lock_t *a, \
+ diva_os_spin_lock_magic_t *old_irql, \
+ void *dbg) { spin_unlock_bh(a); }
-#define diva_os_destroy_spin_lock(a,b) do { } while(0)
+#define diva_os_destroy_spin_lock(a, b) do { } while (0)
/*
** Deffered processing framework
*/
-typedef int (*diva_os_isr_callback_t)(struct _ISDN_ADAPTER*);
-typedef void (*diva_os_soft_isr_callback_t)(struct _diva_os_soft_isr* psoft_isr, void* context);
+typedef int (*diva_os_isr_callback_t)(struct _ISDN_ADAPTER *);
+typedef void (*diva_os_soft_isr_callback_t)(struct _diva_os_soft_isr *psoft_isr, void *context);
typedef struct _diva_os_soft_isr {
- void* object;
- diva_os_soft_isr_callback_t callback;
- void* callback_context;
- char dpc_thread_name[24];
+ void *object;
+ diva_os_soft_isr_callback_t callback;
+ void *callback_context;
+ char dpc_thread_name[24];
} diva_os_soft_isr_t;
-int diva_os_initialize_soft_isr (diva_os_soft_isr_t* psoft_isr, diva_os_soft_isr_callback_t callback, void* callback_context);
-int diva_os_schedule_soft_isr (diva_os_soft_isr_t* psoft_isr);
-int diva_os_cancel_soft_isr (diva_os_soft_isr_t* psoft_isr);
-void diva_os_remove_soft_isr (diva_os_soft_isr_t* psoft_isr);
+int diva_os_initialize_soft_isr(diva_os_soft_isr_t *psoft_isr, diva_os_soft_isr_callback_t callback, void *callback_context);
+int diva_os_schedule_soft_isr(diva_os_soft_isr_t *psoft_isr);
+int diva_os_cancel_soft_isr(diva_os_soft_isr_t *psoft_isr);
+void diva_os_remove_soft_isr(diva_os_soft_isr_t *psoft_isr);
/*
Get time service
- */
-void diva_os_get_time (dword* sec, dword* usec);
+*/
+void diva_os_get_time(dword *sec, dword *usec);
/*
** atomic operation, fake because we use threads
*/
typedef int diva_os_atomic_t;
static diva_os_atomic_t __inline__
-diva_os_atomic_increment(diva_os_atomic_t* pv)
+diva_os_atomic_increment(diva_os_atomic_t *pv)
{
- *pv += 1;
- return (*pv);
+ *pv += 1;
+ return (*pv);
}
static diva_os_atomic_t __inline__
-diva_os_atomic_decrement(diva_os_atomic_t* pv)
+diva_os_atomic_decrement(diva_os_atomic_t *pv)
{
- *pv -= 1;
- return (*pv);
+ *pv -= 1;
+ return (*pv);
}
-/*
+/*
** CAPI SECTION
*/
#define NO_CORNETN
@@ -319,9 +319,9 @@ diva_os_atomic_decrement(diva_os_atomic_t* pv)
#define READ_WORD(addr) readw(addr)
#define READ_DWORD(addr) readl(addr)
-#define WRITE_BYTE(addr,v) writeb(v,addr)
-#define WRITE_WORD(addr,v) writew(v,addr)
-#define WRITE_DWORD(addr,v) writel(v,addr)
+#define WRITE_BYTE(addr, v) writeb(v, addr)
+#define WRITE_WORD(addr, v) writew(v, addr)
+#define WRITE_DWORD(addr, v) writel(v, addr)
static inline __u16 GET_WORD(void *addr)
{
@@ -344,10 +344,10 @@ static inline void PUT_DWORD(void *addr, __u32 v)
** 32/64 bit macors
*/
#ifdef BITS_PER_LONG
- #if BITS_PER_LONG > 32
- #define PLATFORM_GT_32BIT
- #define ULongToPtr(x) (void *)(unsigned long)(x)
- #endif
+#if BITS_PER_LONG > 32
+#define PLATFORM_GT_32BIT
+#define ULongToPtr(x) (void *)(unsigned long)(x)
+#endif
#endif
/*
@@ -362,7 +362,7 @@ static inline void PUT_DWORD(void *addr, __u32 v)
*/
#define diva_os_dump_file_t char
#define diva_os_board_trace_t char
-#define diva_os_dump_file(__x__) do { } while(0)
+#define diva_os_dump_file(__x__) do { } while (0)
/*
** size of internal arrays