summaryrefslogtreecommitdiffstats
path: root/drivers/isdn/capi/kcapi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/isdn/capi/kcapi.c')
-rw-r--r--drivers/isdn/capi/kcapi.c116
1 files changed, 58 insertions, 58 deletions
diff --git a/drivers/isdn/capi/kcapi.c b/drivers/isdn/capi/kcapi.c
index 2b33b2627fce..9b1b274c7d25 100644
--- a/drivers/isdn/capi/kcapi.c
+++ b/drivers/isdn/capi/kcapi.c
@@ -1,10 +1,10 @@
/* $Id: kcapi.c,v 1.1.2.8 2004/03/26 19:57:20 armin Exp $
- *
+ *
* Kernel CAPI 2.0 Module
- *
+ *
* Copyright 1999 by Carsten Paeth <calle@calle.de>
* Copyright 2002 by Kai Germaschewski <kai@germaschewski.name>
- *
+ *
* This software may be used and distributed according to the terms
* of the GNU General Public License, incorporated herein by reference.
*
@@ -55,7 +55,7 @@ struct capictr_event {
/* ------------------------------------------------------------- */
-static struct capi_version driver_version = {2, 0, 1, 1<<4};
+static struct capi_version driver_version = {2, 0, 1, 1 << 4};
static char driver_serial[CAPI_SERIAL_LEN] = "0004711";
static char capi_manufakturer[64] = "AVM Berlin";
@@ -172,7 +172,7 @@ register_appl(struct capi_ctr *ctr, u16 applid, capi_register_params *rparam)
static void release_appl(struct capi_ctr *ctr, u16 applid)
{
DBG("applid %#x", applid);
-
+
ctr->release_appl(ctr, applid);
capi_ctr_put(ctr);
}
@@ -186,7 +186,7 @@ static void notify_up(u32 contr)
mutex_lock(&capi_controller_lock);
if (showcapimsgs & 1)
- printk(KERN_DEBUG "kcapi: notify up contr %d\n", contr);
+ printk(KERN_DEBUG "kcapi: notify up contr %d\n", contr);
ctr = get_capi_ctr_by_nr(contr);
if (ctr) {
@@ -352,16 +352,16 @@ void capi_ctr_handle_message(struct capi_ctr *ctr, u16 appl,
cdb = capi_message2str(skb->data);
if (cdb) {
printk(KERN_INFO "kcapi: controller [%03d] not active, got: %s",
- ctr->cnr, cdb->buf);
+ ctr->cnr, cdb->buf);
cdebbuf_free(cdb);
} else
printk(KERN_INFO "kcapi: controller [%03d] not active, cannot trace\n",
- ctr->cnr);
+ ctr->cnr);
goto error;
}
cmd = CAPIMSG_COMMAND(skb->data);
- subcmd = CAPIMSG_SUBCOMMAND(skb->data);
+ subcmd = CAPIMSG_SUBCOMMAND(skb->data);
if (cmd == CAPI_DATA_B3 && subcmd == CAPI_IND) {
ctr->nrecvdatapkt++;
if (ctr->traceflag > 2)
@@ -382,13 +382,13 @@ void capi_ctr_handle_message(struct capi_ctr *ctr, u16 appl,
cdb = capi_message2str(skb->data);
if (cdb) {
printk(KERN_DEBUG "kcapi: got [%03d] %s\n",
- ctr->cnr, cdb->buf);
+ ctr->cnr, cdb->buf);
cdebbuf_free(cdb);
} else
printk(KERN_DEBUG "kcapi: got [%03d] id#%d %s len=%u, cannot trace\n",
- ctr->cnr, CAPIMSG_APPID(skb->data),
- capi_cmd2str(cmd, subcmd),
- CAPIMSG_LEN(skb->data));
+ ctr->cnr, CAPIMSG_APPID(skb->data),
+ capi_cmd2str(cmd, subcmd),
+ CAPIMSG_LEN(skb->data));
}
}
@@ -400,12 +400,12 @@ void capi_ctr_handle_message(struct capi_ctr *ctr, u16 appl,
cdb = capi_message2str(skb->data);
if (cdb) {
printk(KERN_ERR "kcapi: handle_message: applid %d state released (%s)\n",
- CAPIMSG_APPID(skb->data), cdb->buf);
+ CAPIMSG_APPID(skb->data), cdb->buf);
cdebbuf_free(cdb);
} else
printk(KERN_ERR "kcapi: handle_message: applid %d state released (%s) cannot trace\n",
- CAPIMSG_APPID(skb->data),
- capi_cmd2str(cmd, subcmd));
+ CAPIMSG_APPID(skb->data),
+ capi_cmd2str(cmd, subcmd));
goto error;
}
skb_queue_tail(&ap->recv_queue, skb);
@@ -519,7 +519,7 @@ int attach_capi_ctr(struct capi_ctr *ctr)
if (i == CAPI_MAXCONTR) {
mutex_unlock(&capi_controller_lock);
printk(KERN_ERR "kcapi: out of controller slots\n");
- return -EBUSY;
+ return -EBUSY;
}
capi_controller[i] = ctr;
@@ -541,7 +541,7 @@ int attach_capi_ctr(struct capi_ctr *ctr)
mutex_unlock(&capi_controller_lock);
printk(KERN_NOTICE "kcapi: controller [%03d]: %s attached\n",
- ctr->cnr, ctr->name);
+ ctr->cnr, ctr->name);
return 0;
}
@@ -772,7 +772,7 @@ u16 capi20_put_message(struct capi20_appl *ap, struct sk_buff *skb)
u8 cmd, subcmd;
DBG("applid %#x", ap->applid);
-
+
if (ncontrollers == 0)
return CAPI_REGNOTINSTALLED;
if ((ap->applid == 0) || ap->release_in_progress)
@@ -794,9 +794,9 @@ u16 capi20_put_message(struct capi20_appl *ap, struct sk_buff *skb)
return CAPI_SENDQUEUEFULL;
cmd = CAPIMSG_COMMAND(skb->data);
- subcmd = CAPIMSG_SUBCOMMAND(skb->data);
+ subcmd = CAPIMSG_SUBCOMMAND(skb->data);
- if (cmd == CAPI_DATA_B3 && subcmd== CAPI_REQ) {
+ if (cmd == CAPI_DATA_B3 && subcmd == CAPI_REQ) {
ctr->nsentdatapkt++;
ap->nsentdatapkt++;
if (ctr->traceflag > 2)
@@ -819,15 +819,15 @@ u16 capi20_put_message(struct capi20_appl *ap, struct sk_buff *skb)
_cdebbuf *cdb = capi_message2str(skb->data);
if (cdb) {
printk(KERN_DEBUG "kcapi: put [%03d] %s\n",
- CAPIMSG_CONTROLLER(skb->data),
- cdb->buf);
+ CAPIMSG_CONTROLLER(skb->data),
+ cdb->buf);
cdebbuf_free(cdb);
} else
printk(KERN_DEBUG "kcapi: put [%03d] id#%d %s len=%u cannot trace\n",
- CAPIMSG_CONTROLLER(skb->data),
- CAPIMSG_APPID(skb->data),
- capi_cmd2str(cmd, subcmd),
- CAPIMSG_LEN(skb->data));
+ CAPIMSG_CONTROLLER(skb->data),
+ CAPIMSG_APPID(skb->data),
+ capi_cmd2str(cmd, subcmd),
+ CAPIMSG_LEN(skb->data));
}
}
return ctr->send_message(ctr, skb);
@@ -1028,14 +1028,14 @@ static int old_capi_manufacturer(unsigned int cmd, void __user *data)
case AVMB1_ADDCARD:
case AVMB1_ADDCARD_WITH_TYPE:
if (cmd == AVMB1_ADDCARD) {
- if ((retval = copy_from_user(&cdef, data,
- sizeof(avmb1_carddef))))
- return -EFAULT;
- cdef.cardtype = AVM_CARDTYPE_B1;
+ if ((retval = copy_from_user(&cdef, data,
+ sizeof(avmb1_carddef))))
+ return -EFAULT;
+ cdef.cardtype = AVM_CARDTYPE_B1;
} else {
- if ((retval = copy_from_user(&cdef, data,
- sizeof(avmb1_extcarddef))))
- return -EFAULT;
+ if ((retval = copy_from_user(&cdef, data,
+ sizeof(avmb1_extcarddef))))
+ return -EFAULT;
}
cparams.port = cdef.port;
cparams.irq = cdef.irq;
@@ -1043,24 +1043,24 @@ static int old_capi_manufacturer(unsigned int cmd, void __user *data)
mutex_lock(&capi_drivers_lock);
- switch (cdef.cardtype) {
- case AVM_CARDTYPE_B1:
- list_for_each(l, &capi_drivers) {
- driver = list_entry(l, struct capi_driver, list);
- if (strcmp(driver->name, "b1isa") == 0)
- break;
- }
- break;
- case AVM_CARDTYPE_T1:
- list_for_each(l, &capi_drivers) {
- driver = list_entry(l, struct capi_driver, list);
- if (strcmp(driver->name, "t1isa") == 0)
- break;
- }
- break;
- default:
- driver = NULL;
- break;
+ switch (cdef.cardtype) {
+ case AVM_CARDTYPE_B1:
+ list_for_each(l, &capi_drivers) {
+ driver = list_entry(l, struct capi_driver, list);
+ if (strcmp(driver->name, "b1isa") == 0)
+ break;
+ }
+ break;
+ case AVM_CARDTYPE_T1:
+ list_for_each(l, &capi_drivers) {
+ driver = list_entry(l, struct capi_driver, list);
+ if (strcmp(driver->name, "t1isa") == 0)
+ break;
+ }
+ break;
+ default:
+ driver = NULL;
+ break;
}
if (!driver) {
printk(KERN_ERR "kcapi: driver not loaded.\n");
@@ -1136,7 +1136,7 @@ static int old_capi_manufacturer(unsigned int cmd, void __user *data)
retval = wait_on_ctr_state(ctr, CAPI_CTR_RUNNING);
-load_unlock_out:
+ load_unlock_out:
mutex_unlock(&capi_controller_lock);
return retval;
@@ -1167,7 +1167,7 @@ load_unlock_out:
retval = wait_on_ctr_state(ctr, CAPI_CTR_DETECTED);
-reset_unlock_out:
+ reset_unlock_out:
mutex_unlock(&capi_controller_lock);
return retval;
}
@@ -1235,7 +1235,7 @@ int capi20_manufacturer(unsigned int cmd, void __user *data)
cparams.membase = cdef.membase;
cparams.cardnr = cdef.cardnr;
cparams.cardtype = 0;
- cdef.driver[sizeof(cdef.driver)-1] = 0;
+ cdef.driver[sizeof(cdef.driver) - 1] = 0;
mutex_lock(&capi_drivers_lock);
@@ -1246,7 +1246,7 @@ int capi20_manufacturer(unsigned int cmd, void __user *data)
}
if (driver == NULL) {
printk(KERN_ERR "kcapi: driver \"%s\" not loaded.\n",
- cdef.driver);
+ cdef.driver);
retval = -ESRCH;
} else if (!driver->add_card) {
printk(KERN_ERR "kcapi: driver \"%s\" has no add card function.\n", cdef.driver);
@@ -1260,7 +1260,7 @@ int capi20_manufacturer(unsigned int cmd, void __user *data)
default:
printk(KERN_ERR "kcapi: manufacturer command %d unknown.\n",
- cmd);
+ cmd);
break;
}
@@ -1305,7 +1305,7 @@ static int __init kcapi_init(void)
static void __exit kcapi_exit(void)
{
- kcapi_proc_exit();
+ kcapi_proc_exit();
unregister_capictr_notifier(&capictr_nb);
cdebug_exit();