aboutsummaryrefslogtreecommitdiff
path: root/drivers/isdn/hardware/eicon/divasmain.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/isdn/hardware/eicon/divasmain.c')
-rw-r--r--drivers/isdn/hardware/eicon/divasmain.c118
1 files changed, 59 insertions, 59 deletions
diff --git a/drivers/isdn/hardware/eicon/divasmain.c b/drivers/isdn/hardware/eicon/divasmain.c
index f332b60eff6b..7eaab06276f9 100644
--- a/drivers/isdn/hardware/eicon/divasmain.c
+++ b/drivers/isdn/hardware/eicon/divasmain.c
@@ -50,7 +50,7 @@ module_param(dbgmask, int, 0);
MODULE_PARM_DESC(dbgmask, "initial debug mask");
static char *DRIVERNAME =
- "Eicon DIVA Server driver (http://www.melware.net)";
+ "Eicon DIVA Server driver (http://www.melware.net)";
static char *DRIVERLNAME = "divas";
static char *DEVNAME = "Divas";
char *DRIVERRELEASE_DIVAS = "2.0";
@@ -68,7 +68,7 @@ typedef struct _diva_os_thread_dpc {
} diva_os_thread_dpc_t;
/* --------------------------------------------------------------------------
- PCI driver interface section
+ PCI driver interface section
-------------------------------------------------------------------------- */
/*
vendor, device Vendor and device ID to match (or PCI_ANY_ID)
@@ -77,7 +77,7 @@ typedef struct _diva_os_thread_dpc {
class, Device class to match. The class_mask tells which bits
class_mask of the class are honored during the comparison.
driver_data Data private to the driver.
- */
+*/
#if !defined(PCI_DEVICE_ID_EICON_MAESTRAP_2)
#define PCI_DEVICE_ID_EICON_MAESTRAP_2 0xE015
@@ -109,41 +109,41 @@ typedef struct _diva_os_thread_dpc {
/*
This table should be sorted by PCI device ID
- */
+*/
static struct pci_device_id divas_pci_tbl[] = {
/* Diva Server BRI-2M PCI 0xE010 */
{ PCI_VDEVICE(EICON, PCI_DEVICE_ID_EICON_MAESTRA),
- CARDTYPE_MAESTRA_PCI },
+ CARDTYPE_MAESTRA_PCI },
/* Diva Server 4BRI-8M PCI 0xE012 */
{ PCI_VDEVICE(EICON, PCI_DEVICE_ID_EICON_MAESTRAQ),
- CARDTYPE_DIVASRV_Q_8M_PCI },
+ CARDTYPE_DIVASRV_Q_8M_PCI },
/* Diva Server 4BRI-8M 2.0 PCI 0xE013 */
{ PCI_VDEVICE(EICON, PCI_DEVICE_ID_EICON_MAESTRAQ_U),
- CARDTYPE_DIVASRV_Q_8M_V2_PCI },
+ CARDTYPE_DIVASRV_Q_8M_V2_PCI },
/* Diva Server PRI-30M PCI 0xE014 */
{ PCI_VDEVICE(EICON, PCI_DEVICE_ID_EICON_MAESTRAP),
- CARDTYPE_DIVASRV_P_30M_PCI },
+ CARDTYPE_DIVASRV_P_30M_PCI },
/* Diva Server PRI 2.0 adapter 0xE015 */
{ PCI_VDEVICE(EICON, PCI_DEVICE_ID_EICON_MAESTRAP_2),
- CARDTYPE_DIVASRV_P_30M_V2_PCI },
+ CARDTYPE_DIVASRV_P_30M_V2_PCI },
/* Diva Server Voice 4BRI-8M PCI 0xE016 */
{ PCI_VDEVICE(EICON, PCI_DEVICE_ID_EICON_4BRI_VOIP),
- CARDTYPE_DIVASRV_VOICE_Q_8M_PCI },
+ CARDTYPE_DIVASRV_VOICE_Q_8M_PCI },
/* Diva Server Voice 4BRI-8M 2.0 PCI 0xE017 */
{ PCI_VDEVICE(EICON, PCI_DEVICE_ID_EICON_4BRI_2_VOIP),
- CARDTYPE_DIVASRV_VOICE_Q_8M_V2_PCI },
+ CARDTYPE_DIVASRV_VOICE_Q_8M_V2_PCI },
/* Diva Server BRI-2M 2.0 PCI 0xE018 */
{ PCI_VDEVICE(EICON, PCI_DEVICE_ID_EICON_BRI2M_2),
- CARDTYPE_DIVASRV_B_2M_V2_PCI },
+ CARDTYPE_DIVASRV_B_2M_V2_PCI },
/* Diva Server Voice PRI 2.0 PCI 0xE019 */
{ PCI_VDEVICE(EICON, PCI_DEVICE_ID_EICON_MAESTRAP_2_VOIP),
- CARDTYPE_DIVASRV_VOICE_P_30M_V2_PCI },
+ CARDTYPE_DIVASRV_VOICE_P_30M_V2_PCI },
/* Diva Server 2FX 0xE01A */
{ PCI_VDEVICE(EICON, PCI_DEVICE_ID_EICON_2F),
- CARDTYPE_DIVASRV_B_2F_PCI },
+ CARDTYPE_DIVASRV_B_2F_PCI },
/* Diva Server Voice BRI-2M 2.0 PCI 0xE01B */
{ PCI_VDEVICE(EICON, PCI_DEVICE_ID_EICON_BRI2M_2_VOIP),
- CARDTYPE_DIVASRV_VOICE_B_2M_V2_PCI },
+ CARDTYPE_DIVASRV_VOICE_B_2M_V2_PCI },
{ 0, } /* 0 terminated list. */
};
MODULE_DEVICE_TABLE(pci, divas_pci_tbl);
@@ -197,7 +197,7 @@ void divas_get_version(char *p)
}
/* --------------------------------------------------------------------------
- PCI Bus services
+ PCI Bus services
-------------------------------------------------------------------------- */
byte diva_os_get_pci_bus(void *pci_dev_handle)
{
@@ -332,10 +332,10 @@ void PCIread(byte bus, byte func, int offset, void *data, int length,
Init map with DMA pages. It is not problem if some allocations fail -
the channels that will not get one DMA page will use standard PIO
interface
- */
+*/
static void *diva_pci_alloc_consistent(struct pci_dev *hwdev,
size_t size,
- dma_addr_t * dma_handle,
+ dma_addr_t *dma_handle,
void **addr_handle)
{
void *addr = pci_alloc_consistent(hwdev, size, dma_handle);
@@ -350,7 +350,7 @@ void diva_init_dma_map(void *hdev,
{
struct pci_dev *pdev = (struct pci_dev *) hdev;
struct _diva_dma_map_entry *pmap =
- diva_alloc_dma_map(hdev, nentries);
+ diva_alloc_dma_map(hdev, nentries);
if (pmap) {
int i;
@@ -381,7 +381,7 @@ void diva_init_dma_map(void *hdev,
/*
Free all contained in the map entries and memory used by the map
Should be always called after adapter removal from DIDD array
- */
+*/
void diva_free_dma_map(void *hdev, struct _diva_dma_map_entry *pmap)
{
struct pci_dev *pdev = (struct pci_dev *) hdev;
@@ -403,14 +403,14 @@ void diva_free_dma_map(void *hdev, struct _diva_dma_map_entry *pmap)
DBG_TRC(("dma map free [%d]=(%08lx:%08x:%08lx)", i,
(unsigned long) cpu_addr, (dword) dma_handle,
(unsigned long) addr_handle))
- }
+ }
diva_free_dma_mapping(pmap);
}
/*********************************************************
- ** I/O port utilities
+ ** I/O port utilities
*********************************************************/
int
@@ -420,7 +420,7 @@ diva_os_register_io_port(void *adapter, int on, unsigned long port,
if (on) {
if (!request_region(port, length, name)) {
DBG_ERR(("A: I/O: can't register port=%08x", port))
- return (-1);
+ return (-1);
}
} else {
release_region(port, length);
@@ -443,7 +443,7 @@ void divasa_unmap_pci_bar(void __iomem *bar)
}
/*********************************************************
- ** I/O port access
+ ** I/O port access
*********************************************************/
byte __inline__ inpp(void __iomem *addr)
{
@@ -476,7 +476,7 @@ void __inline__ outpp(void __iomem *addr, word p)
}
/* --------------------------------------------------------------------------
- IRQ request / remove
+ IRQ request / remove
-------------------------------------------------------------------------- */
int diva_os_register_irq(void *context, byte irq, const char *name)
{
@@ -491,7 +491,7 @@ void diva_os_remove_irq(void *context, byte irq)
}
/* --------------------------------------------------------------------------
- DPC framework implementation
+ DPC framework implementation
-------------------------------------------------------------------------- */
static void diva_os_dpc_proc(unsigned long context)
{
@@ -501,7 +501,7 @@ static void diva_os_dpc_proc(unsigned long context)
(*(pisr->callback)) (pisr, pisr->callback_context);
}
-int diva_os_initialize_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)
{
@@ -520,11 +520,11 @@ int diva_os_initialize_soft_isr(diva_os_soft_isr_t * psoft_isr,
return (0);
}
-int diva_os_schedule_soft_isr(diva_os_soft_isr_t * psoft_isr)
+int diva_os_schedule_soft_isr(diva_os_soft_isr_t *psoft_isr)
{
if (psoft_isr && psoft_isr->object) {
diva_os_thread_dpc_t *pdpc =
- (diva_os_thread_dpc_t *) psoft_isr->object;
+ (diva_os_thread_dpc_t *) psoft_isr->object;
tasklet_schedule(&pdpc->divas_task);
}
@@ -532,16 +532,16 @@ int diva_os_schedule_soft_isr(diva_os_soft_isr_t * psoft_isr)
return (1);
}
-int diva_os_cancel_soft_isr(diva_os_soft_isr_t * psoft_isr)
+int diva_os_cancel_soft_isr(diva_os_soft_isr_t *psoft_isr)
{
return (0);
}
-void diva_os_remove_soft_isr(diva_os_soft_isr_t * psoft_isr)
+void diva_os_remove_soft_isr(diva_os_soft_isr_t *psoft_isr)
{
if (psoft_isr && psoft_isr->object) {
diva_os_thread_dpc_t *pdpc =
- (diva_os_thread_dpc_t *) psoft_isr->object;
+ (diva_os_thread_dpc_t *) psoft_isr->object;
void *mem;
tasklet_kill(&pdpc->divas_task);
@@ -589,7 +589,7 @@ static int divas_release(struct inode *inode, struct file *file)
}
static ssize_t divas_write(struct file *file, const char __user *buf,
- size_t count, loff_t * ppos)
+ size_t count, loff_t *ppos)
{
int ret = -EINVAL;
@@ -620,7 +620,7 @@ static ssize_t divas_write(struct file *file, const char __user *buf,
}
static ssize_t divas_read(struct file *file, char __user *buf,
- size_t count, loff_t * ppos)
+ size_t count, loff_t *ppos)
{
int ret = -EINVAL;
@@ -650,7 +650,7 @@ static ssize_t divas_read(struct file *file, char __user *buf,
return (ret);
}
-static unsigned int divas_poll(struct file *file, poll_table * wait)
+static unsigned int divas_poll(struct file *file, poll_table *wait)
{
if (!file->private_data) {
return (POLLERR);
@@ -686,7 +686,7 @@ static int DIVA_INIT_FUNCTION divas_register_chrdev(void)
}
/* --------------------------------------------------------------------------
- PCI driver section
+ PCI driver section
-------------------------------------------------------------------------- */
static int __devinit divas_init_one(struct pci_dev *pdev,
const struct pci_device_id *ent)
@@ -698,9 +698,9 @@ static int __devinit divas_init_one(struct pci_dev *pdev,
DBG_TRC(("%s bus: %08x fn: %08x insertion.\n",
CardProperties[ent->driver_data].Name,
pdev->bus->number, pdev->devfn))
- printk(KERN_INFO "%s: %s bus: %08x fn: %08x insertion.\n",
- DRIVERLNAME, CardProperties[ent->driver_data].Name,
- pdev->bus->number, pdev->devfn);
+ printk(KERN_INFO "%s: %s bus: %08x fn: %08x insertion.\n",
+ DRIVERLNAME, CardProperties[ent->driver_data].Name,
+ pdev->bus->number, pdev->devfn);
if (pci_enable_device(pdev)) {
DBG_TRC(("%s: %s bus: %08x fn: %08x device init failed.\n",
@@ -708,12 +708,12 @@ static int __devinit divas_init_one(struct pci_dev *pdev,
CardProperties[ent->driver_data].Name,
pdev->bus->number,
pdev->devfn))
- printk(KERN_ERR
- "%s: %s bus: %08x fn: %08x device init failed.\n",
- DRIVERLNAME,
- CardProperties[ent->driver_data].
- Name, pdev->bus->number,
- pdev->devfn);
+ printk(KERN_ERR
+ "%s: %s bus: %08x fn: %08x device init failed.\n",
+ DRIVERLNAME,
+ CardProperties[ent->driver_data].
+ Name, pdev->bus->number,
+ pdev->devfn);
return (-EIO);
}
@@ -723,9 +723,9 @@ static int __devinit divas_init_one(struct pci_dev *pdev,
if (!pci_latency) {
DBG_TRC(("%s: bus: %08x fn: %08x fix latency.\n",
DRIVERLNAME, pdev->bus->number, pdev->devfn))
- printk(KERN_INFO
- "%s: bus: %08x fn: %08x fix latency.\n",
- DRIVERLNAME, pdev->bus->number, pdev->devfn);
+ printk(KERN_INFO
+ "%s: bus: %08x fn: %08x fix latency.\n",
+ DRIVERLNAME, pdev->bus->number, pdev->devfn);
pci_write_config_byte(pdev, PCI_LATENCY_TIMER, new_latency);
}
@@ -735,12 +735,12 @@ static int __devinit divas_init_one(struct pci_dev *pdev,
CardProperties[ent->driver_data].Name,
pdev->bus->number,
pdev->devfn))
- printk(KERN_ERR
- "%s: %s bus: %08x fn: %08x card init failed.\n",
- DRIVERLNAME,
- CardProperties[ent->driver_data].
- Name, pdev->bus->number,
- pdev->devfn);
+ printk(KERN_ERR
+ "%s: %s bus: %08x fn: %08x card init failed.\n",
+ DRIVERLNAME,
+ CardProperties[ent->driver_data].
+ Name, pdev->bus->number,
+ pdev->devfn);
return (-EIO);
}
@@ -755,8 +755,8 @@ static void __devexit divas_remove_one(struct pci_dev *pdev)
DBG_TRC(("bus: %08x fn: %08x removal.\n",
pdev->bus->number, pdev->devfn))
- printk(KERN_INFO "%s: bus: %08x fn: %08x removal.\n",
- DRIVERLNAME, pdev->bus->number, pdev->devfn);
+ printk(KERN_INFO "%s: bus: %08x fn: %08x removal.\n",
+ DRIVERLNAME, pdev->bus->number, pdev->devfn);
if (pdiva) {
diva_driver_remove_card(pdiva);
@@ -765,7 +765,7 @@ static void __devexit divas_remove_one(struct pci_dev *pdev)
}
/* --------------------------------------------------------------------------
- Driver Load / Startup
+ Driver Load / Startup
-------------------------------------------------------------------------- */
static int DIVA_INIT_FUNCTION divas_init(void)
{
@@ -824,12 +824,12 @@ static int DIVA_INIT_FUNCTION divas_init(void)
}
printk(KERN_INFO "%s: started with major %d\n", DRIVERLNAME, major);
- out:
+out:
return (ret);
}
/* --------------------------------------------------------------------------
- Driver Unload
+ Driver Unload
-------------------------------------------------------------------------- */
static void DIVA_EXIT_FUNCTION divas_exit(void)
{