Commit 475be4d8 authored by Joe Perches's avatar Joe Perches

isdn: whitespace coding style cleanup

isdn source code uses a not-current coding style.

Update the coding style used on a per-line basis
so that git diff -w shows only elided blank lines
at EOF.

Done with emacs and some scripts and some typing.

Built x86 allyesconfig.
No detected change in objdump -d or size.
Signed-off-by: default avatarJoe Perches <joe@perches.com>
parent 0b0a635f
......@@ -129,7 +129,7 @@ typedef struct act2000_chan {
typedef struct msn_entry {
char eaz;
char msn[16];
struct msn_entry * next;
struct msn_entry *next;
} msn_entry;
typedef struct irq_data_isa {
......
......@@ -85,7 +85,7 @@ act2000_isa_interrupt(int dummy, void *dev_id)
}
static void
act2000_isa_select_irq(act2000_card * card)
act2000_isa_select_irq(act2000_card *card)
{
unsigned char reg;
......@@ -117,7 +117,7 @@ act2000_isa_select_irq(act2000_card * card)
}
static void
act2000_isa_enable_irq(act2000_card * card)
act2000_isa_enable_irq(act2000_card *card)
{
act2000_isa_select_irq(card);
/* Enable READ irq */
......@@ -129,7 +129,7 @@ act2000_isa_enable_irq(act2000_card * card)
* If irq is -1, choose next free irq, else irq is given explicitly.
*/
int
act2000_isa_config_irq(act2000_card * card, short irq)
act2000_isa_config_irq(act2000_card *card, short irq)
{
int old_irq;
......@@ -147,7 +147,7 @@ act2000_isa_config_irq(act2000_card * card, short irq)
card->irq = old_irq;
card->flags |= ACT2000_FLAGS_IVALID;
printk(KERN_WARNING
"act2000: Could not request irq %d\n",irq);
"act2000: Could not request irq %d\n", irq);
return -EBUSY;
} else {
act2000_isa_select_irq(card);
......@@ -159,7 +159,7 @@ act2000_isa_config_irq(act2000_card * card, short irq)
}
int
act2000_isa_config_port(act2000_card * card, unsigned short portbase)
act2000_isa_config_port(act2000_card *card, unsigned short portbase)
{
if (card->flags & ACT2000_FLAGS_PVALID) {
release_region(card->port, ISA_REGION);
......@@ -178,7 +178,7 @@ act2000_isa_config_port(act2000_card * card, unsigned short portbase)
* Release ressources, used by an adaptor.
*/
void
act2000_isa_release(act2000_card * card)
act2000_isa_release(act2000_card *card)
{
unsigned long flags;
......@@ -194,7 +194,7 @@ act2000_isa_release(act2000_card * card)
}
static int
act2000_isa_writeb(act2000_card * card, u_char data)
act2000_isa_writeb(act2000_card *card, u_char data)
{
u_char timeout = 40;
......@@ -211,7 +211,7 @@ act2000_isa_writeb(act2000_card * card, u_char data)
}
static int
act2000_isa_readb(act2000_card * card, u_char * data)
act2000_isa_readb(act2000_card *card, u_char *data)
{
u_char timeout = 40;
......@@ -291,7 +291,7 @@ act2000_isa_receive(act2000_card *card)
}
void
act2000_isa_send(act2000_card * card)
act2000_isa_send(act2000_card *card)
{
unsigned long flags;
struct sk_buff *skb;
......@@ -307,7 +307,7 @@ act2000_isa_send(act2000_card * card)
card->ack_msg = card->sbuf->data;
msg = (actcapi_msg *)card->sbuf->data;
if ((msg->hdr.cmd.cmd == 0x86) &&
(msg->hdr.cmd.subcmd == 0) ) {
(msg->hdr.cmd.subcmd == 0)) {
/* Save flags in message */
card->need_b3ack = msg->msg.data_b3_req.flags;
msg->msg.data_b3_req.flags = 0;
......@@ -335,7 +335,7 @@ act2000_isa_send(act2000_card * card)
}
msg = (actcapi_msg *)card->ack_msg;
if ((msg->hdr.cmd.cmd == 0x86) &&
(msg->hdr.cmd.subcmd == 0) ) {
(msg->hdr.cmd.subcmd == 0)) {
/*
* If it's user data, reset data-ptr
* and put skb into ackq.
......@@ -354,11 +354,11 @@ act2000_isa_send(act2000_card * card)
* Get firmware ID, check for 'ISDN' signature.
*/
static int
act2000_isa_getid(act2000_card * card)
act2000_isa_getid(act2000_card *card)
{
act2000_fwid fid;
u_char *p = (u_char *) & fid;
u_char *p = (u_char *)&fid;
int count = 0;
while (1) {
......@@ -392,7 +392,7 @@ act2000_isa_getid(act2000_card * card)
* Download microcode into card, check Firmware signature.
*/
int
act2000_isa_download(act2000_card * card, act2000_ddef __user * cb)
act2000_isa_download(act2000_card *card, act2000_ddef __user *cb)
{
unsigned int length;
int l;
......
......@@ -114,22 +114,22 @@ typedef enum {
/* Macros for accessing ports */
#define ISA_PORT_COR (card->port+ISA_COR)
#define ISA_PORT_ISR (card->port+ISA_ISR)
#define ISA_PORT_EPR (card->port+ISA_EPR)
#define ISA_PORT_EER (card->port+ISA_EER)
#define ISA_PORT_SDI (card->port+ISA_SDI)
#define ISA_PORT_SDO (card->port+ISA_SDO)
#define ISA_PORT_SIS (card->port+ISA_SIS)
#define ISA_PORT_SOS (card->port+ISA_SOS)
#define ISA_PORT_COR (card->port + ISA_COR)
#define ISA_PORT_ISR (card->port + ISA_ISR)
#define ISA_PORT_EPR (card->port + ISA_EPR)
#define ISA_PORT_EER (card->port + ISA_EER)
#define ISA_PORT_SDI (card->port + ISA_SDI)
#define ISA_PORT_SDO (card->port + ISA_SDO)
#define ISA_PORT_SIS (card->port + ISA_SIS)
#define ISA_PORT_SOS (card->port + ISA_SOS)
/* Prototypes */
extern int act2000_isa_detect(unsigned short portbase);
extern int act2000_isa_config_irq(act2000_card * card, short irq);
extern int act2000_isa_config_port(act2000_card * card, unsigned short portbase);
extern int act2000_isa_download(act2000_card * card, act2000_ddef __user * cb);
extern void act2000_isa_release(act2000_card * card);
extern int act2000_isa_config_irq(act2000_card *card, short irq);
extern int act2000_isa_config_port(act2000_card *card, unsigned short portbase);
extern int act2000_isa_download(act2000_card *card, act2000_ddef __user *cb);
extern void act2000_isa_release(act2000_card *card);
extern void act2000_isa_receive(act2000_card *card);
extern void act2000_isa_send(act2000_card *card);
......
......@@ -88,7 +88,7 @@ static actcapi_msgdsc valid_msg[] = {
* 2 = Valid message, B-Channel-data
*/
int
actcapi_chkhdr(act2000_card * card, actcapi_msghdr *hdr)
actcapi_chkhdr(act2000_card *card, actcapi_msghdr *hdr)
{
int i;
......@@ -99,7 +99,7 @@ actcapi_chkhdr(act2000_card * card, actcapi_msghdr *hdr)
for (i = 0; i < num_valid_imsg; i++)
if ((hdr->cmd.cmd == valid_msg[i].cmd.cmd) &&
(hdr->cmd.subcmd == valid_msg[i].cmd.subcmd)) {
return (i?1:2);
return (i ? 1 : 2);
}
return 0;
}
......@@ -113,19 +113,19 @@ actcapi_chkhdr(act2000_card * card, actcapi_msghdr *hdr)
m->hdr.cmd.cmd = c; \
m->hdr.cmd.subcmd = s; \
m->hdr.msgnum = actcapi_nextsmsg(card); \
} else m = NULL;\
}
} else m = NULL; \
}
#define ACTCAPI_CHKSKB if (!skb) { \
printk(KERN_WARNING "actcapi: alloc_skb failed\n"); \
return; \
}
}
#define ACTCAPI_QUEUE_TX { \
actcapi_debug_msg(skb, 1); \
skb_queue_tail(&card->sndq, skb); \
act2000_schedule_tx(card); \
}
}
int
actcapi_listen_req(act2000_card *card)
......@@ -145,7 +145,7 @@ actcapi_listen_req(act2000_card *card)
m->msg.listen_req.controller = 0;
m->msg.listen_req.infomask = 0x3f; /* All information */
m->msg.listen_req.eazmask = eazmask;
m->msg.listen_req.simask = (eazmask)?0x86:0; /* All SI's */
m->msg.listen_req.simask = (eazmask) ? 0x86 : 0; /* All SI's */
ACTCAPI_QUEUE_TX;
return 0;
}
......@@ -168,7 +168,7 @@ actcapi_connect_req(act2000_card *card, act2000_chan *chan, char *phone,
m->msg.connect_req.infomask = 0x3f;
m->msg.connect_req.si1 = si1;
m->msg.connect_req.si2 = si2;
m->msg.connect_req.eaz = eaz?eaz:'0';
m->msg.connect_req.eaz = eaz ? eaz : '0';
m->msg.connect_req.addr.len = strlen(phone) + 1;
m->msg.connect_req.addr.tnp = 0x81;
memcpy(m->msg.connect_req.addr.num, phone, strlen(phone));
......@@ -209,14 +209,14 @@ actcapi_manufacturer_req_net(act2000_card *card)
}
m->msg.manufacturer_req_net.manuf_msg = 0x11;
m->msg.manufacturer_req_net.controller = 1;
m->msg.manufacturer_req_net.nettype = (card->ptype == ISDN_PTYPE_EURO)?1:0;
m->msg.manufacturer_req_net.nettype = (card->ptype == ISDN_PTYPE_EURO) ? 1 : 0;
ACTCAPI_QUEUE_TX;
printk(KERN_INFO "act2000 %s: D-channel protocol now %s\n",
card->interface.id, (card->ptype == ISDN_PTYPE_EURO)?"euro":"1tr6");
card->interface.id, (card->ptype == ISDN_PTYPE_EURO) ? "euro" : "1tr6");
card->interface.features &=
~(ISDN_FEATURE_P_UNKNOWN | ISDN_FEATURE_P_EURO | ISDN_FEATURE_P_1TR6);
card->interface.features |=
((card->ptype == ISDN_PTYPE_EURO)?ISDN_FEATURE_P_EURO:ISDN_FEATURE_P_1TR6);
((card->ptype == ISDN_PTYPE_EURO) ? ISDN_FEATURE_P_EURO : ISDN_FEATURE_P_1TR6);
return 0;
}
......@@ -238,7 +238,7 @@ actcapi_manufacturer_req_v42(act2000_card *card, ulong arg)
}
m->msg.manufacturer_req_v42.manuf_msg = 0x10;
m->msg.manufacturer_req_v42.controller = 0;
m->msg.manufacturer_req_v42.v42control = (arg?1:0);
m->msg.manufacturer_req_v42.v42control = (arg ? 1 : 0);
ACTCAPI_QUEUE_TX;
return 0;
}
......@@ -434,7 +434,7 @@ actcapi_connect_b3_resp(act2000_card *card, act2000_chan *chan, __u8 rejectcause
actcapi_msg *m;
struct sk_buff *skb;
ACTCAPI_MKHDR((rejectcause?3:17), 0x82, 0x03);
ACTCAPI_MKHDR((rejectcause ? 3 : 17), 0x82, 0x03);
ACTCAPI_CHKSKB;
m->msg.connect_b3_resp.ncci = chan->ncci;
m->msg.connect_b3_resp.rejectcause = rejectcause;
......@@ -1030,7 +1030,7 @@ actcapi_debug_msg(struct sk_buff *skb, int direction)
descr = valid_msg[i].description;
break;
}
printk(KERN_DEBUG "%s %s msg\n", direction?"Outgoing":"Incoming", descr);
printk(KERN_DEBUG "%s %s msg\n", direction ? "Outgoing" : "Incoming", descr);
printk(KERN_DEBUG " ApplID = %d\n", msg->hdr.applicationID);
printk(KERN_DEBUG " Len = %d\n", msg->hdr.len);
printk(KERN_DEBUG " MsgNum = 0x%04x\n", msg->hdr.msgnum);
......@@ -1086,7 +1086,7 @@ actcapi_debug_msg(struct sk_buff *skb, int direction)
int l = msg->hdr.len - 12;
int j;
char *p = tmp;
for (j = 0; j < l ; j++)
for (j = 0; j < l; j++)
p += sprintf(p, "%02x ", msg->msg.info_ind.el.display[j]);
printk(KERN_DEBUG " D = '%s'\n", tmp);
}
......
......@@ -46,10 +46,10 @@ typedef struct actcapi_addr {
typedef union actcapi_infonr { /* info number */
__u16 mask; /* info-mask field */
struct bmask { /* bit definitions */
unsigned codes : 3; /* code set */
unsigned rsvd : 5; /* reserved */
unsigned svind : 1; /* single, variable length ind. */
unsigned wtype : 7; /* W-element type */
unsigned codes:3; /* code set */
unsigned rsvd:5; /* reserved */
unsigned svind:1; /* single, variable length ind. */
unsigned wtype:7; /* W-element type */
} bmask;
} actcapi_infonr;
......@@ -59,12 +59,12 @@ typedef union actcapi_infoel { /* info element */
__u8 display[40]; /* display contents */
__u8 uuinfo[40]; /* User-user info field */
struct cause { /* Cause information */
unsigned ext2 : 1; /* extension */
unsigned cod : 2; /* coding standard */
unsigned spare : 1; /* spare */
unsigned loc : 4; /* location */
unsigned ext1 : 1; /* extension */
unsigned cval : 7; /* Cause value */
unsigned ext2:1; /* extension */
unsigned cod:2; /* coding standard */
unsigned spare:1; /* spare */
unsigned loc:4; /* location */
unsigned ext1:1; /* extension */
unsigned cval:7; /* Cause value */
} cause;
struct charge { /* Charging information */
__u8 toc; /* type of charging info */
......@@ -111,14 +111,14 @@ typedef struct actcapi_ncpd {
* Bit 5-7 = Controller
* Bit 8-15 = NCCI
*/
#define MAKE_NCCI(plci,contr,ncci) \
#define MAKE_NCCI(plci, contr, ncci) \
((plci & 0x1f) | ((contr & 0x7) << 5) | ((ncci & 0xff) << 8))
#define EVAL_NCCI(fakencci,plci,contr,ncci) { \
#define EVAL_NCCI(fakencci, plci, contr, ncci) { \
plci = fakencci & 0x1f; \
contr = (fakencci >> 5) & 0x7; \
ncci = (fakencci >> 8) & 0xff; \
}
}
/*
* Layout of PLCI field in a B3 DATA CAPI message is different from
......@@ -128,13 +128,13 @@ typedef struct actcapi_ncpd {
* Bit 5-7 = Controller
* Bit 8-15 = reserved (must be 0)
*/
#define MAKE_PLCI(plci,contr) \
#define MAKE_PLCI(plci, contr) \
((plci & 0x1f) | ((contr & 0x7) << 5))
#define EVAL_PLCI(fakeplci,plci,contr) { \
#define EVAL_PLCI(fakeplci, plci, contr) { \
plci = fakeplci & 0x1f; \
contr = (fakeplci >> 5) & 0x7; \
}
}
typedef struct actcapi_msg {
actcapi_msghdr hdr;
......
......@@ -33,9 +33,9 @@ static int act_port = -1; /* -1 = Autoprobe */
static int act_irq = -1;
static char *act_id = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
MODULE_DESCRIPTION( "ISDN4Linux: Driver for IBM Active 2000 ISDN card");
MODULE_AUTHOR( "Fritz Elfert");
MODULE_LICENSE( "GPL");
MODULE_DESCRIPTION("ISDN4Linux: Driver for IBM Active 2000 ISDN card");
MODULE_AUTHOR("Fritz Elfert");
MODULE_LICENSE("GPL");
MODULE_PARM_DESC(act_bus, "BusType of first card, 1=ISA, 2=MCA, 3=PCMCIA, currently only ISA");
MODULE_PARM_DESC(membase, "Base port address of first card");
MODULE_PARM_DESC(act_irq, "IRQ of first card");
......@@ -111,10 +111,10 @@ act2000_find_eaz(act2000_card *card, char eaz)
while (p) {
if (p->eaz == eaz)
return(p->msn);
return (p->msn);
p = p->next;
}
return("\0");
return ("\0");
}
/*
......@@ -230,17 +230,17 @@ act2000_receive(struct work_struct *work)
static void
act2000_poll(unsigned long data)
{
act2000_card * card = (act2000_card *)data;
act2000_card *card = (act2000_card *)data;
unsigned long flags;
act2000_receive(&card->poll_tq);
spin_lock_irqsave(&card->lock, flags);
mod_timer(&card->ptimer, jiffies+3);
mod_timer(&card->ptimer, jiffies + 3);
spin_unlock_irqrestore(&card->lock, flags);
}
static int
act2000_command(act2000_card * card, isdn_ctrl * c)
act2000_command(act2000_card *card, isdn_ctrl *c)
{
ulong a;
act2000_chan *chan;
......@@ -280,7 +280,7 @@ act2000_command(act2000_card * card, isdn_ctrl * c)
}
return ret;
case ACT2000_IOCTL_SETPROTO:
card->ptype = a?ISDN_PTYPE_EURO:ISDN_PTYPE_1TR6;
card->ptype = a ? ISDN_PTYPE_EURO : ISDN_PTYPE_1TR6;
if (!(card->flags & ACT2000_FLAGS_RUNNING))
return 0;
actcapi_manufacturer_req_net(card);
......@@ -292,7 +292,7 @@ act2000_command(act2000_card * card, isdn_ctrl * c)
if ((ret = act2000_set_msn(card, tmp)))
return ret;
if (card->flags & ACT2000_FLAGS_RUNNING)
return(actcapi_manufacturer_req_msn(card));
return (actcapi_manufacturer_req_msn(card));
return 0;
case ACT2000_IOCTL_ADDCARD:
if (copy_from_user(&cdef, arg,
......@@ -471,7 +471,7 @@ act2000_sendbuf(act2000_card *card, int channel, int ack, struct sk_buff *skb)
/* Read the Status-replies from the Interface */
static int
act2000_readstatus(u_char __user * buf, int len, act2000_card * card)
act2000_readstatus(u_char __user *buf, int len, act2000_card *card)
{
int count;
u_char __user *p;
......@@ -506,7 +506,7 @@ act2000_findcard(int driverid)
* Wrapper functions for interface to linklevel
*/
static int
if_command(isdn_ctrl * c)
if_command(isdn_ctrl *c)
{
act2000_card *card = act2000_findcard(c->driver);
......@@ -534,7 +534,7 @@ if_writecmd(const u_char __user *buf, int len, int id, int channel)
}
static int
if_readstatus(u_char __user * buf, int len, int id, int channel)
if_readstatus(u_char __user *buf, int len, int id, int channel)
{
act2000_card *card = act2000_findcard(id);
......@@ -602,7 +602,7 @@ act2000_alloccard(int bus, int port, int irq, char *id)
card->interface.hl_hdrlen = 20;
card->ptype = ISDN_PTYPE_EURO;
strlcpy(card->interface.id, id, sizeof(card->interface.id));
for (i=0; i<ACT2000_BCH; i++) {
for (i = 0; i < ACT2000_BCH; i++) {
card->bch[i].plci = 0x8000;
card->bch[i].ncci = 0x8000;
card->bch[i].l2prot = ISDN_PROTO_L2_X75I;
......@@ -620,7 +620,7 @@ act2000_alloccard(int bus, int port, int irq, char *id)
* register card at linklevel
*/
static int
act2000_registercard(act2000_card * card)
act2000_registercard(act2000_card *card)
{
switch (card->bus) {
case ACT2000_BUS_ISA:
......@@ -645,7 +645,7 @@ act2000_registercard(act2000_card * card)
}
static void
unregister_card(act2000_card * card)
unregister_card(act2000_card *card)
{
isdn_ctrl cmd;
......
......@@ -391,7 +391,7 @@ gen_data_b3_resp_for(struct capiminor *mp, struct sk_buff *skb)
struct sk_buff *nskb;
nskb = alloc_skb(CAPI_DATA_B3_RESP_LEN, GFP_KERNEL);
if (nskb) {
u16 datahandle = CAPIMSG_U16(skb->data,CAPIMSG_BASELEN+4+4+2);
u16 datahandle = CAPIMSG_U16(skb->data, CAPIMSG_BASELEN + 4 + 4 + 2);
unsigned char *s = skb_put(nskb, CAPI_DATA_B3_RESP_LEN);
capimsg_setu16(s, 0, CAPI_DATA_B3_RESP_LEN);
capimsg_setu16(s, 2, mp->ap->applid);
......@@ -618,7 +618,7 @@ static void capi_recv_message(struct capi20_appl *ap, struct sk_buff *skb)
goto unlock_out;
}
if (CAPIMSG_SUBCOMMAND(skb->data) == CAPI_IND) {
datahandle = CAPIMSG_U16(skb->data, CAPIMSG_BASELEN+4+4+2);
datahandle = CAPIMSG_U16(skb->data, CAPIMSG_BASELEN + 4 + 4 + 2);
pr_debug("capi_signal: DATA_B3_IND %u len=%d\n",
datahandle, skb->len-CAPIMSG_LEN(skb->data));
skb_queue_tail(&mp->inqueue, skb);
......@@ -627,10 +627,10 @@ static void capi_recv_message(struct capi20_appl *ap, struct sk_buff *skb)
} else if (CAPIMSG_SUBCOMMAND(skb->data) == CAPI_CONF) {
datahandle = CAPIMSG_U16(skb->data, CAPIMSG_BASELEN+4);
datahandle = CAPIMSG_U16(skb->data, CAPIMSG_BASELEN + 4);
pr_debug("capi_signal: DATA_B3_CONF %u 0x%x\n",
datahandle,
CAPIMSG_U16(skb->data, CAPIMSG_BASELEN+4+2));
CAPIMSG_U16(skb->data, CAPIMSG_BASELEN + 4 + 2));
kfree_skb(skb);
capiminor_del_ack(mp, datahandle);
tty = tty_port_tty_get(&mp->port);
......@@ -736,7 +736,7 @@ capi_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos
}
static unsigned int
capi_poll(struct file *file, poll_table * wait)
capi_poll(struct file *file, poll_table *wait)
{
struct capidev *cdev = file->private_data;
unsigned int mask = 0;
......@@ -804,7 +804,7 @@ capi_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
if (copy_from_user(&data.contr, argp,
sizeof(data.contr)))
return -EFAULT;
cdev->errcode = capi20_get_serial (data.contr, data.serial);
cdev->errcode = capi20_get_serial(data.contr, data.serial);
if (cdev->errcode)
return -EIO;
if (copy_to_user(argp, data.serial,
......@@ -1070,7 +1070,7 @@ static int capinc_tty_write(struct tty_struct *tty,
mp->outbytes += skb->len;
}
skb = alloc_skb(CAPI_DATA_B3_REQ_LEN+count, GFP_ATOMIC);
skb = alloc_skb(CAPI_DATA_B3_REQ_LEN + count, GFP_ATOMIC);
if (!skb) {
printk(KERN_ERR "capinc_tty_write: alloc_skb failed\n");
spin_unlock_bh(&mp->outlock);
......@@ -1111,7 +1111,7 @@ static int capinc_tty_put_char(struct tty_struct *tty, unsigned char ch)
invoke_send = true;
}
skb = alloc_skb(CAPI_DATA_B3_REQ_LEN+CAPI_MAX_BLKSIZE, GFP_ATOMIC);
skb = alloc_skb(CAPI_DATA_B3_REQ_LEN + CAPI_MAX_BLKSIZE, GFP_ATOMIC);
if (skb) {
skb_reserve(skb, CAPI_DATA_B3_REQ_LEN);
*(skb_put(skb, 1)) = ch;
......@@ -1180,7 +1180,7 @@ static int capinc_tty_ioctl(struct tty_struct *tty,
return -ENOIOCTLCMD;
}
static void capinc_tty_set_termios(struct tty_struct *tty, struct ktermios * old)
static void capinc_tty_set_termios(struct tty_struct *tty, struct ktermios *old)
{
pr_debug("capinc_tty_set_termios\n");
}
......
This diff is collapsed.
......@@ -5,8 +5,8 @@
#include <linux/isdn/capilli.h>
#define DBG(format, arg...) do { \
printk(KERN_DEBUG "%s: " format "\n" , __func__ , ## arg); \
} while (0)
printk(KERN_DEBUG "%s: " format "\n" , __func__ , ## arg); \
} while (0)
struct capilib_msgidqueue {
struct capilib_msgidqueue *next;
......@@ -28,7 +28,7 @@ struct capilib_ncci {
// ---------------------------------------------------------------------------
// NCCI Handling
static inline void mq_init(struct capilib_ncci * np)
static inline void mq_init(struct capilib_ncci *np)
{
u_int i;
np->msgidqueue = NULL;
......@@ -42,7 +42,7 @@ static inline void mq_init(struct capilib_ncci * np)
}
}
static inline int mq_enqueue(struct capilib_ncci * np, u16 msgid)
static inline int mq_enqueue(struct capilib_ncci *np, u16 msgid)
{
struct capilib_msgidqueue *mq;
if ((mq = np->msgidfree) == NULL)
......@@ -59,7 +59,7 @@ static inline int mq_enqueue(struct capilib_ncci * np, u16 msgid)
return 1;
}
static inline int mq_dequeue(struct capilib_ncci * np, u16 msgid)
static inline int mq_dequeue(struct capilib_ncci *np, u16 msgid)
{
struct capilib_msgidqueue **pp;
for (pp = &np->msgidqueue; *pp; pp = &(*pp)->next) {
......
......@@ -387,17 +387,17 @@ static unsigned char *cpars[] =
/*-------------------------------------------------------*/
#define byteTLcpy(x,y) *(u8 *)(x)=*(u8 *)(y);
#define wordTLcpy(x,y) *(u16 *)(x)=*(u16 *)(y);
#define dwordTLcpy(x,y) memcpy(x,y,4);
#define structTLcpy(x,y,l) memcpy (x,y,l)
#define structTLcpyovl(x,y,l) memmove (x,y,l)
#define byteTRcpy(x,y) *(u8 *)(y)=*(u8 *)(x);
#define wordTRcpy(x,y) *(u16 *)(y)=*(u16 *)(x);
#define dwordTRcpy(x,y) memcpy(y,x,4);
#define structTRcpy(x,y,l) memcpy (y,x,l)
#define structTRcpyovl(x,y,l) memmove (y,x,l)
#define byteTLcpy(x, y) *(u8 *)(x) = *(u8 *)(y);
#define wordTLcpy(x, y) *(u16 *)(x) = *(u16 *)(y);
#define dwordTLcpy(x, y) memcpy(x, y, 4);
#define structTLcpy(x, y, l) memcpy(x, y, l)
#define structTLcpyovl(x, y, l) memmove(x, y, l)
#define byteTRcpy(x, y) *(u8 *)(y) = *(u8 *)(x);
#define wordTRcpy(x, y) *(u16 *)(y) = *(u16 *)(x);
#define dwordTRcpy(x, y) memcpy(y, x, 4);
#define structTRcpy(x, y, l) memcpy(y, x, l)
#define structTRcpyovl(x, y, l) memmove(y, x, l)
/*-------------------------------------------------------*/
static unsigned command_2_index(unsigned c, unsigned sc)
......@@ -414,9 +414,9 @@ static unsigned command_2_index(unsigned c, unsigned sc)
/*-------------------------------------------------------*/
#define TYP (cdef[cmsg->par[cmsg->p]].typ)
#define OFF (((u8 *)cmsg)+cdef[cmsg->par[cmsg->p]].off)
#define OFF (((u8 *)cmsg) + cdef[cmsg->par[cmsg->p]].off)
static void jumpcstruct(_cmsg * cmsg)
static void jumpcstruct(_cmsg *cmsg)
{
unsigned layer;
for (cmsg->p++, layer = 1; layer;) {
......@@ -433,7 +433,7 @@ static void jumpcstruct(_cmsg * cmsg)
}
}
/*-------------------------------------------------------*/
static void pars_2_message(_cmsg * cmsg)
static void pars_2_message(_cmsg *cmsg)
{
for (; TYP != _CEND; cmsg->p++) {
......@@ -499,7 +499,7 @@ static void pars_2_message(_cmsg * cmsg)
* Return value: 0 for success
*/
unsigned capi_cmsg2message(_cmsg * cmsg, u8 * msg)
unsigned capi_cmsg2message(_cmsg *cmsg, u8 *msg)
{
cmsg->m = msg;
cmsg->l = 8;
......@@ -518,7 +518,7 @@ unsigned capi_cmsg2message(_cmsg * cmsg, u8 * msg)
}
/*-------------------------------------------------------*/
static void message_2_pars(_cmsg * cmsg)
static void message_2_pars(_cmsg *cmsg)
{
for (; TYP != _CEND; cmsg->p++) {
......@@ -569,7 +569,7 @@ static void message_2_pars(_cmsg * cmsg)
* Return value: 0 for success
*/
unsigned capi_message2cmsg(_cmsg * cmsg, u8 * msg)
unsigned capi_message2cmsg(_cmsg *cmsg, u8 *msg)
{
memset(cmsg, 0, sizeof(_cmsg));
cmsg->m = msg;
......@@ -600,7 +600,7 @@ unsigned capi_message2cmsg(_cmsg * cmsg, u8 * msg)
* Return value: 0 for success
*/
unsigned capi_cmsg_header(_cmsg * cmsg, u16 _ApplId,
unsigned capi_cmsg_header(_cmsg *cmsg, u16 _ApplId,
u8 _Command, u8 _Subcommand,
u16 _Messagenumber, u32 _Controller)
{
......@@ -744,10 +744,10 @@ static char *pnames[] =
#include <stdarg.h>
/*-------------------------------------------------------*/
static _cdebbuf *bufprint(_cdebbuf *cdb, char *fmt,...)
static _cdebbuf *bufprint(_cdebbuf *cdb, char *fmt, ...)
{
va_list f;
size_t n,r;
size_t n, r;
if (!cdb)
return NULL;
......@@ -783,7 +783,7 @@ static _cdebbuf *bufprint(_cdebbuf *cdb, char *fmt,...)
return cdb;
}
static _cdebbuf *printstructlen(_cdebbuf *cdb, u8 * m, unsigned len)
static _cdebbuf *printstructlen(_cdebbuf *cdb, u8 *m, unsigned len)
{
unsigned hex = 0;
......@@ -807,7 +807,7 @@ static _cdebbuf *printstructlen(_cdebbuf *cdb, u8 * m, unsigned len)
return cdb;
}
static _cdebbuf *printstruct(_cdebbuf *cdb, u8 * m)
static _cdebbuf *printstruct(_cdebbuf *cdb, u8 *m)
{
unsigned len;
......@@ -940,7 +940,7 @@ void cdebbuf_free(_cdebbuf *cdb)
* The returned buffer should be freed by a call to cdebbuf_free() after use.
*/
_cdebbuf *capi_message2str(u8 * msg)
_cdebbuf *capi_message2str(u8 *msg)
{
_cdebbuf *cdb;
_cmsg *cmsg;
......@@ -986,7 +986,7 @@ _cdebbuf *capi_message2str(u8 * msg)
* The returned buffer should be freed by a call to cdebbuf_free() after use.
*/
_cdebbuf *capi_cmsg2str(_cmsg * cmsg)
_cdebbuf *capi_cmsg2str(_cmsg *cmsg)
{
_cdebbuf *cdb;
......@@ -1008,7 +1008,7 @@ _cdebbuf *capi_cmsg2str(_cmsg * cmsg)
int __init cdebug_init(void)
{
g_cmsg= kmalloc(sizeof(_cmsg), GFP_KERNEL);
g_cmsg = kmalloc(sizeof(_cmsg), GFP_KERNEL);
if (!g_cmsg)
return -ENOMEM;
g_debbuf = kmalloc(sizeof(_cdebbuf), GFP_KERNEL);
......@@ -1041,12 +1041,12 @@ void __exit cdebug_exit(void)
static _cdebbuf g_debbuf = {"CONFIG_CAPI_TRACE not enabled", NULL, 0, 0};
_cdebbuf *capi_message2str(u8 * msg)
_cdebbuf *capi_message2str(u8 *msg)
{
return &g_debbuf;
}
_cdebbuf *capi_cmsg2str(_cmsg * cmsg)
_cdebbuf *capi_cmsg2str(_cmsg *cmsg)
{
return &g_debbuf;
}
......
......@@ -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";
......@@ -796,7 +796,7 @@ u16 capi20_put_message(struct capi20_appl *ap, struct sk_buff *skb)
cmd = CAPIMSG_COMMAND(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)
......@@ -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 @@ static int old_capi_manufacturer(unsigned int cmd, void __user *data)
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);
......
......@@ -17,8 +17,8 @@
#ifdef KCAPI_DEBUG
#define DBG(format, arg...) do { \
printk(KERN_DEBUG "%s: " format "\n" , __func__ , ## arg); \
} while (0)
printk(KERN_DEBUG "%s: " format "\n" , __func__ , ## arg); \
} while (0)
#else
#define DBG(format, arg...) /* */
#endif
......@@ -49,4 +49,3 @@ static inline void kcapi_proc_init(void) { };
static inline void kcapi_proc_exit(void) { };
#endif
......@@ -23,13 +23,13 @@ MODULE_LICENSE("GPL");
/* structure containing interface to hl */
/****************************************/
isdn_divert_if divert_if =
{ DIVERT_IF_MAGIC, /* magic value */
{ DIVERT_IF_MAGIC, /* magic value */
DIVERT_CMD_REG, /* register cmd */
ll_callback, /* callback routine from ll */
NULL, /* command still not specified */
NULL, /* drv_to_name */
NULL, /* name_to_drv */
};
};
/*************************/
/* Module interface code */
......@@ -40,15 +40,15 @@ static int __init divert_init(void)
if (divert_dev_init())
{ printk(KERN_WARNING "dss1_divert: cannot install device, not loaded\n");
return(-EIO);
return (-EIO);
}
if ((i = DIVERT_REG_NAME(&divert_if)) != DIVERT_NO_ERR)
{ divert_dev_deinit();
printk(KERN_WARNING "dss1_divert: error %d registering module, not loaded\n",i);
return(-EIO);
printk(KERN_WARNING "dss1_divert: error %d registering module, not loaded\n", i);
return (-EIO);
}
printk(KERN_INFO "dss1_divert module successfully installed\n");
return(0);
return (0);
}
/**********************/
......@@ -62,7 +62,7 @@ static void __exit divert_exit(void)
spin_lock_irqsave(&divert_lock, flags);
divert_if.cmd = DIVERT_CMD_REL; /* release */
if ((i = DIVERT_REG_NAME(&divert_if)) != DIVERT_NO_ERR)
{ printk(KERN_WARNING "dss1_divert: error %d releasing module\n",i);
{ printk(KERN_WARNING "dss1_divert: error %d releasing module\n", i);
spin_unlock_irqrestore(&divert_lock, flags);
return;
}
......@@ -79,4 +79,3 @@ static void __exit divert_exit(void)
module_init(divert_init);
module_exit(divert_exit);
......@@ -53,7 +53,7 @@ put_info_buffer(char *cp)
return; /* no memory */
strcpy(ib->info_start, cp); /* set output string */
ib->next = NULL;
spin_lock_irqsave( &divert_info_lock, flags );
spin_lock_irqsave(&divert_info_lock, flags);
ib->usage_cnt = if_used;
if (!divert_info_head)
divert_info_head = ib; /* new head */
......@@ -71,7 +71,7 @@ put_info_buffer(char *cp)
} else
break;
} /* divert_info_head->next */
spin_unlock_irqrestore( &divert_info_lock, flags );
spin_unlock_irqrestore(&divert_info_lock, flags);
wake_up_interruptible(&(rd_queue));
} /* put_info_buffer */
......@@ -81,7 +81,7 @@ put_info_buffer(char *cp)
/* deflection device read routine */
/**********************************/
static ssize_t
isdn_divert_read(struct file *file, char __user *buf, size_t count, loff_t * off)
isdn_divert_read(struct file *file, char __user *buf, size_t count, loff_t *off)
{
struct divert_info *inf;
int len;
......@@ -109,7 +109,7 @@ isdn_divert_read(struct file *file, char __user *buf, size_t count, loff_t * off
/* deflection device write routine */
/**********************************/
static ssize_t
isdn_divert_write(struct file *file, const char __user *buf, size_t count, loff_t * off)
isdn_divert_write(struct file *file, const char __user *buf, size_t count, loff_t *off)
{
return (-ENODEV);
} /* isdn_divert_write */
......@@ -119,7 +119,7 @@ isdn_divert_write(struct file *file, const char __user *buf, size_t count, loff_
/* select routines for various kernels */
/***************************************/
static unsigned int
isdn_divert_poll(struct file *file, poll_table * wait)
isdn_divert_poll(struct file *file, poll_table *wait)
{
unsigned int mask = 0;
......@@ -139,13 +139,13 @@ isdn_divert_open(struct inode *ino, struct file *filep)
{
unsigned long flags;
spin_lock_irqsave( &divert_info_lock, flags );
spin_lock_irqsave(&divert_info_lock, flags);
if_used++;
if (divert_info_head)
filep->private_data = &(divert_info_tail->next);
else
filep->private_data = &divert_info_head;
spin_unlock_irqrestore( &divert_info_lock, flags );
spin_unlock_irqrestore(&divert_info_lock, flags);
/* start_divert(); */
return nonseekable_open(ino, filep);
} /* isdn_divert_open */
......@@ -159,7 +159,7 @@ isdn_divert_close(struct inode *ino, struct file *filep)
struct divert_info *inf;
unsigned long flags;
spin_lock_irqsave( &divert_info_lock, flags );
spin_lock_irqsave(&divert_info_lock, flags);
if_used--;
inf = *((struct divert_info **) filep->private_data);
while (inf) {
......@@ -172,7 +172,7 @@ isdn_divert_close(struct inode *ino, struct file *filep)
divert_info_head = divert_info_head->next;
kfree(inf);
}
spin_unlock_irqrestore( &divert_info_lock, flags );
spin_unlock_irqrestore(&divert_info_lock, flags);
return (0);
} /* isdn_divert_close */
......
This diff is collapsed.
......@@ -25,8 +25,8 @@
#define IIOCDELRULE _IO('I', 7) /* delete a rule */
#define IIOCDODFACT _IO('I', 8) /* hangup/reject/alert/immediately deflect a call */
#define IIOCDOCFACT _IO('I', 9) /* activate control forwarding in PBX */
#define IIOCDOCFDIS _IO('I',10) /* deactivate control forwarding in PBX */
#define IIOCDOCFINT _IO('I',11) /* interrogate control forwarding in PBX */
#define IIOCDOCFDIS _IO('I', 10) /* deactivate control forwarding in PBX */
#define IIOCDOCFINT _IO('I', 11) /* interrogate control forwarding in PBX */
/*************************************/
/* states reported through interface */
......@@ -44,11 +44,11 @@
#define DEFLECT_ALL_IDS 0xFFFFFFFF /* all drivers selected */
typedef struct
{ ulong drvid; /* driver ids, bit mapped */
{ ulong drvid; /* driver ids, bit mapped */
char my_msn[35]; /* desired msn, subaddr allowed */
char caller[35]; /* caller id, partial string with * + subaddr allowed */
char to_nr[35]; /* deflected to number incl. subaddress */
u_char si1,si2; /* service indicators, si1=bitmask, si1+2 0 = all */
u_char si1, si2; /* service indicators, si1=bitmask, si1+2 0 = all */
u_char screen; /* screening: 0 = no info, 1 = info, 2 = nfo with nr */
u_char callopt; /* option for call handling:
0 = all calls
......@@ -63,10 +63,10 @@ typedef struct
actions 1-2 only take place if interface is opened
*/
u_char waittime; /* maximum wait time for proceeding */
} divert_rule;
} divert_rule;
typedef union
{ int drv_version; /* return of driver version */
{ int drv_version; /* return of driver version */
struct
{ int drvid; /* id of driver */
char drvnam[30]; /* name of driver */
......@@ -92,7 +92,7 @@ typedef union
char msn[25]; /* desired msn, empty = all */
char fwd_nr[35];/* forwarded to number + subaddress */
} cf_ctrl;
} divert_ioctl;
} divert_ioctl;
#ifdef __KERNEL__
......@@ -105,10 +105,10 @@ typedef union
/* structure keeping ascii info for device output */
/**************************************************/
struct divert_info
{ struct divert_info *next;
{ struct divert_info *next;
ulong usage_cnt; /* number of files still to work */
char info_start[2]; /* info string start */
};
};
/**************/
......
......@@ -543,7 +543,7 @@ static struct sk_buff *iraw_encode(struct sk_buff *skb)
/* size of new buffer (worst case = every byte must be stuffed):
* 2 * original size + room for link layer header
*/
iraw_skb = dev_alloc_skb(2*skb->len + skb->mac_len);
iraw_skb = dev_alloc_skb(2 * skb->len + skb->mac_len);
if (!iraw_skb) {
dev_kfree_skb_any(skb);
return NULL;
......
......@@ -1017,17 +1017,17 @@ static int starturbs(struct bc_state *bcs)
}
/* keep one URB free, submit the others */
for (k = 0; k < BAS_OUTURBS-1; ++k) {
for (k = 0; k < BAS_OUTURBS - 1; ++k) {
dump_urb(DEBUG_ISO, "Initial isoc write", urb);
rc = usb_submit_urb(ubc->isoouturbs[k].urb, GFP_ATOMIC);
if (rc != 0)
goto error;
}
dump_urb(DEBUG_ISO, "Initial isoc write (free)", urb);
ubc->isooutfree = &ubc->isoouturbs[BAS_OUTURBS-1];
ubc->isooutfree = &ubc->isoouturbs[BAS_OUTURBS - 1];
ubc->isooutdone = ubc->isooutovfl = NULL;
return 0;
error:
error:
stopurbs(ubc);
return rc;
}
......@@ -2454,12 +2454,12 @@ static int gigaset_suspend(struct usb_interface *intf, pm_message_t message)
/* wait a bit for blocking conditions to go away */
rc = wait_event_timeout(ucs->waitqueue,
!(ucs->basstate &
(BS_B1OPEN|BS_B2OPEN|BS_ATRDPEND|BS_ATWRPEND)),
BAS_TIMEOUT*HZ/10);
(BS_B1OPEN | BS_B2OPEN | BS_ATRDPEND | BS_ATWRPEND)),
BAS_TIMEOUT * HZ / 10);
gig_dbg(DEBUG_SUSPEND, "wait_event_timeout() -> %d", rc);
/* check for conditions preventing suspend */
if (ucs->basstate & (BS_B1OPEN|BS_B2OPEN|BS_ATRDPEND|BS_ATWRPEND)) {
if (ucs->basstate & (BS_B1OPEN | BS_B2OPEN | BS_ATRDPEND | BS_ATWRPEND)) {
dev_warn(cs->dev, "cannot suspend:\n");
if (ucs->basstate & BS_B1OPEN)
dev_warn(cs->dev, " B channel 1 open\n");
......@@ -2482,7 +2482,7 @@ static int gigaset_suspend(struct usb_interface *intf, pm_message_t message)
return rc;
}
wait_event_timeout(ucs->waitqueue, !ucs->pending,
BAS_TIMEOUT*HZ/10);
BAS_TIMEOUT * HZ / 10);
/* in case of timeout, proceed anyway */
}
......
......@@ -26,17 +26,17 @@
#define CapiFacilitySpecificFunctionNotSupported 0x3011
/* missing from capicmd.h */
#define CAPI_CONNECT_IND_BASELEN (CAPI_MSG_BASELEN+4+2+8*1)
#define CAPI_CONNECT_ACTIVE_IND_BASELEN (CAPI_MSG_BASELEN+4+3*1)
#define CAPI_CONNECT_B3_IND_BASELEN (CAPI_MSG_BASELEN+4+1)
#define CAPI_CONNECT_B3_ACTIVE_IND_BASELEN (CAPI_MSG_BASELEN+4+1)
#define CAPI_DATA_B3_REQ_LEN64 (CAPI_MSG_BASELEN+4+4+2+2+2+8)
#define CAPI_DATA_B3_CONF_LEN (CAPI_MSG_BASELEN+4+2+2)
#define CAPI_DISCONNECT_IND_LEN (CAPI_MSG_BASELEN+4+2)
#define CAPI_DISCONNECT_B3_IND_BASELEN (CAPI_MSG_BASELEN+4+2+1)
#define CAPI_FACILITY_CONF_BASELEN (CAPI_MSG_BASELEN+4+2+2+1)
#define CAPI_CONNECT_IND_BASELEN (CAPI_MSG_BASELEN + 4 + 2 + 8 * 1)
#define CAPI_CONNECT_ACTIVE_IND_BASELEN (CAPI_MSG_BASELEN + 4 + 3 * 1)
#define CAPI_CONNECT_B3_IND_BASELEN (CAPI_MSG_BASELEN + 4 + 1)
#define CAPI_CONNECT_B3_ACTIVE_IND_BASELEN (CAPI_MSG_BASELEN + 4 + 1)
#define CAPI_DATA_B3_REQ_LEN64 (CAPI_MSG_BASELEN + 4 + 4 + 2 + 2 + 2 + 8)
#define CAPI_DATA_B3_CONF_LEN (CAPI_MSG_BASELEN + 4 + 2 + 2)
#define CAPI_DISCONNECT_IND_LEN (CAPI_MSG_BASELEN + 4 + 2)
#define CAPI_DISCONNECT_B3_IND_BASELEN (CAPI_MSG_BASELEN + 4 + 2 + 1)
#define CAPI_FACILITY_CONF_BASELEN (CAPI_MSG_BASELEN + 4 + 2 + 2 + 1)
/* most _CONF messages contain only Controller/PLCI/NCCI and Info parameters */
#define CAPI_STDCONF_LEN (CAPI_MSG_BASELEN+4+2)
#define CAPI_STDCONF_LEN (CAPI_MSG_BASELEN + 4 + 2)
#define CAPI_FACILITY_HANDSET 0x0000
#define CAPI_FACILITY_DTMF 0x0001
......@@ -97,10 +97,10 @@ struct gigaset_capi_ctr {
/* two _cmsg structures possibly used concurrently: */
_cmsg hcmsg; /* for message composition triggered from hardware */
_cmsg acmsg; /* for dissection of messages sent from application */
u8 bc_buf[MAX_BC_OCTETS+1];
u8 hlc_buf[MAX_HLC_OCTETS+1];
u8 cgpty_buf[MAX_NUMBER_DIGITS+3];
u8 cdpty_buf[MAX_NUMBER_DIGITS+2];
u8 bc_buf[MAX_BC_OCTETS + 1];
u8 hlc_buf[MAX_HLC_OCTETS + 1];
u8 cgpty_buf[MAX_NUMBER_DIGITS + 3];
u8 cdpty_buf[MAX_NUMBER_DIGITS + 2];
};
/* CIP Value table (from CAPI 2.0 standard, ch. 6.1) */
......@@ -259,15 +259,15 @@ static inline void dump_rawmsg(enum debuglevel level, const char *tag,
CAPIMSG_APPID(data), CAPIMSG_MSGID(data), l,
CAPIMSG_CONTROL(data));
l -= 12;
dbgline = kmalloc(3*l, GFP_ATOMIC);
dbgline = kmalloc(3 * l, GFP_ATOMIC);
if (!dbgline)
return;
for (i = 0; i < l; i++) {
dbgline[3*i] = hex_asc_hi(data[12+i]);
dbgline[3*i+1] = hex_asc_lo(data[12+i]);
dbgline[3*i+2] = ' ';
dbgline[3 * i] = hex_asc_hi(data[12 + i]);
dbgline[3 * i + 1] = hex_asc_lo(data[12 + i]);
dbgline[3 * i + 2] = ' ';
}
dbgline[3*l-1] = '\0';
dbgline[3 * l - 1] = '\0';
gig_dbg(level, " %s", dbgline);
kfree(dbgline);
if (CAPIMSG_COMMAND(data) == CAPI_DATA_B3 &&
......@@ -279,16 +279,16 @@ static inline void dump_rawmsg(enum debuglevel level, const char *tag,
return;
if (l > 64)
l = 64; /* arbitrary limit */
dbgline = kmalloc(3*l, GFP_ATOMIC);
dbgline = kmalloc(3 * l, GFP_ATOMIC);
if (!dbgline)
return;
data += CAPIMSG_LEN(data);
for (i = 0; i < l; i++) {
dbgline[3*i] = hex_asc_hi(data[i]);
dbgline[3*i+1] = hex_asc_lo(data[i]);
dbgline[3*i+2] = ' ';
dbgline[3 * i] = hex_asc_hi(data[i]);
dbgline[3 * i + 1] = hex_asc_lo(data[i]);
dbgline[3 * i + 2] = ' ';
}
dbgline[3*l-1] = '\0';
dbgline[3 * l - 1] = '\0';
gig_dbg(level, " %s", dbgline);
kfree(dbgline);
}
......@@ -301,7 +301,7 @@ static inline void dump_rawmsg(enum debuglevel level, const char *tag,
static const char *format_ie(const char *ie)
{
static char result[3*MAX_FMT_IE_LEN];
static char result[3 * MAX_FMT_IE_LEN];
int len, count;
char *pout = result;
......@@ -310,7 +310,7 @@ static const char *format_ie(const char *ie)
count = len = ie[0];
if (count > MAX_FMT_IE_LEN)
count = MAX_FMT_IE_LEN-1;
count = MAX_FMT_IE_LEN - 1;
while (count--) {
*pout++ = hex_asc_hi(*++ie);
*pout++ = hex_asc_lo(*ie);
......@@ -589,7 +589,7 @@ int gigaset_isdn_icall(struct at_state_t *at_state)
}
iif->cdpty_buf[0] = i + 1;
iif->cdpty_buf[1] = 0x80; /* type / numbering plan unknown */
memcpy(iif->cdpty_buf+2, at_state->str_var[STR_ZCPN], i);
memcpy(iif->cdpty_buf + 2, at_state->str_var[STR_ZCPN], i);
iif->hcmsg.CalledPartyNumber = iif->cdpty_buf;
msgsize += iif->hcmsg.CalledPartyNumber[0];
}
......@@ -605,7 +605,7 @@ int gigaset_isdn_icall(struct at_state_t *at_state)
iif->cgpty_buf[0] = i + 2;
iif->cgpty_buf[1] = 0x00; /* type / numbering plan unknown */
iif->cgpty_buf[2] = 0x80; /* pres. allowed, not screened */
memcpy(iif->cgpty_buf+3, at_state->str_var[STR_NMBR], i);
memcpy(iif->cgpty_buf + 3, at_state->str_var[STR_NMBR], i);
iif->hcmsg.CallingPartyNumber = iif->cgpty_buf;
msgsize += iif->hcmsg.CallingPartyNumber[0];
}
......@@ -1318,7 +1318,7 @@ static void do_connect_req(struct gigaset_capi_ctr *iif,
cmsg->adr.adrPLCI |= (bcs->channel + 1) << 8;
/* build command table */
commands = kzalloc(AT_NUM*(sizeof *commands), GFP_KERNEL);
commands = kzalloc(AT_NUM * (sizeof *commands), GFP_KERNEL);
if (!commands)
goto oom;
......@@ -1353,10 +1353,10 @@ static void do_connect_req(struct gigaset_capi_ctr *iif,
commands[AT_TYPE] = kstrdup(s, GFP_KERNEL);
if (!commands[AT_TYPE])
goto oom;
commands[AT_DIAL] = kmalloc(l+3, GFP_KERNEL);
commands[AT_DIAL] = kmalloc(l + 3, GFP_KERNEL);
if (!commands[AT_DIAL])
goto oom;
snprintf(commands[AT_DIAL], l+3, "D%.*s\r", l, pp);
snprintf(commands[AT_DIAL], l + 3, "D%.*s\r", l, pp);
/* encode parameter: Calling party number */
pp = cmsg->CallingPartyNumber;
......@@ -1406,10 +1406,10 @@ static void do_connect_req(struct gigaset_capi_ctr *iif,
if (l) {
/* number */
commands[AT_MSN] = kmalloc(l+8, GFP_KERNEL);
commands[AT_MSN] = kmalloc(l + 8, GFP_KERNEL);
if (!commands[AT_MSN])
goto oom;
snprintf(commands[AT_MSN], l+8, "^SMSN=%*s\r", l, pp);
snprintf(commands[AT_MSN], l + 8, "^SMSN=%*s\r", l, pp);
}
}
......@@ -1430,13 +1430,13 @@ static void do_connect_req(struct gigaset_capi_ctr *iif,
/* determine lengths */
if (cmsg->BC && cmsg->BC[0]) /* BC specified explicitly */
lbc = 2*cmsg->BC[0];
lbc = 2 * cmsg->BC[0];
else if (cip2bchlc[cmsg->CIPValue].bc) /* BC derived from CIP */
lbc = strlen(cip2bchlc[cmsg->CIPValue].bc);
else /* no BC */
lbc = 0;
if (cmsg->HLC && cmsg->HLC[0]) /* HLC specified explicitly */
lhlc = 2*cmsg->HLC[0];
lhlc = 2 * cmsg->HLC[0];
else if (cip2bchlc[cmsg->CIPValue].hlc) /* HLC derived from CIP */
lhlc = strlen(cip2bchlc[cmsg->CIPValue].hlc);
else /* no HLC */
......@@ -1669,7 +1669,7 @@ static void do_connect_resp(struct gigaset_capi_ctr *iif,
}
/* Accept call */
if (!gigaset_add_event(cs, &cs->bcs[channel-1].at_state,
if (!gigaset_add_event(cs, &cs->bcs[channel - 1].at_state,
EV_ACCEPT, NULL, 0, NULL))
return;
gigaset_schedule_event(cs);
......@@ -1723,7 +1723,7 @@ static void do_connect_resp(struct gigaset_capi_ctr *iif,
/* reject call - will trigger DISCONNECT_IND for this app */
dev_info(cs->dev, "%s: Reject=%x\n",
"CONNECT_RESP", cmsg->Reject);
if (!gigaset_add_event(cs, &cs->bcs[channel-1].at_state,
if (!gigaset_add_event(cs, &cs->bcs[channel - 1].at_state,
EV_HUP, NULL, 0, NULL))
return;
gigaset_schedule_event(cs);
......@@ -1756,7 +1756,7 @@ static void do_connect_b3_req(struct gigaset_capi_ctr *iif,
send_conf(iif, ap, skb, CapiIllContrPlciNcci);
return;
}
bcs = &cs->bcs[channel-1];
bcs = &cs->bcs[channel - 1];
/* mark logical connection active */
bcs->apconnstate = APCONN_ACTIVE;
......@@ -1801,7 +1801,7 @@ static void do_connect_b3_resp(struct gigaset_capi_ctr *iif,
dev_kfree_skb_any(skb);
return;
}
bcs = &cs->bcs[channel-1];
bcs = &cs->bcs[channel - 1];
if (cmsg->Reject) {
/* Reject: clear B3 connect received flag */
......@@ -1947,7 +1947,7 @@ static void do_disconnect_b3_req(struct gigaset_capi_ctr *iif,
send_conf(iif, ap, skb, CapiIllContrPlciNcci);
return;
}
bcs = &cs->bcs[channel-1];
bcs = &cs->bcs[channel - 1];
/* reject if logical connection not active */
if (bcs->apconnstate < APCONN_ACTIVE) {
......@@ -1997,7 +1997,7 @@ static void do_data_b3_req(struct gigaset_capi_ctr *iif,
send_conf(iif, ap, skb, CapiIllContrPlciNcci);
return;
}
bcs = &cs->bcs[channel-1];
bcs = &cs->bcs[channel - 1];
if (msglen != CAPI_DATA_B3_REQ_LEN && msglen != CAPI_DATA_B3_REQ_LEN64)
dev_notice(cs->dev, "%s: unexpected length %d\n",
"DATA_B3_REQ", msglen);
......
......@@ -30,7 +30,7 @@
/* Module parameters */
int gigaset_debuglevel;
EXPORT_SYMBOL_GPL(gigaset_debuglevel);
module_param_named(debug, gigaset_debuglevel, int, S_IRUGO|S_IWUSR);
module_param_named(debug, gigaset_debuglevel, int, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(debug, "debug level");
/* driver state flags */
......@@ -123,7 +123,7 @@ int gigaset_enterconfigmode(struct cardstate *cs)
if (r < 0)
goto error;
}
r = setflags(cs, TIOCM_RTS|TIOCM_DTR, 800);
r = setflags(cs, TIOCM_RTS | TIOCM_DTR, 800);
if (r < 0)
goto error;
......@@ -131,8 +131,8 @@ int gigaset_enterconfigmode(struct cardstate *cs)
error:
dev_err(cs->dev, "error %d on setuartbits\n", -r);
cs->control_state = TIOCM_RTS|TIOCM_DTR;
cs->ops->set_modem_ctrl(cs, 0, TIOCM_RTS|TIOCM_DTR);
cs->control_state = TIOCM_RTS | TIOCM_DTR;
cs->ops->set_modem_ctrl(cs, 0, TIOCM_RTS | TIOCM_DTR);
return -1;
}
......@@ -591,7 +591,7 @@ int gigaset_fill_inbuf(struct inbuf_t *inbuf, const unsigned char *src,
if (head > tail)
n = head - 1 - tail;
else if (head == 0)
n = (RBUFSIZE-1) - tail;
n = (RBUFSIZE - 1) - tail;
else
n = RBUFSIZE - tail;
if (!n) {
......@@ -911,10 +911,10 @@ int gigaset_start(struct cardstate *cs)
spin_unlock_irqrestore(&cs->lock, flags);
if (cs->mstate != MS_LOCKED) {
cs->ops->set_modem_ctrl(cs, 0, TIOCM_DTR|TIOCM_RTS);
cs->ops->set_modem_ctrl(cs, 0, TIOCM_DTR | TIOCM_RTS);
cs->ops->baud_rate(cs, B115200);
cs->ops->set_line_ctrl(cs, CS8);
cs->control_state = TIOCM_DTR|TIOCM_RTS;
cs->control_state = TIOCM_DTR | TIOCM_RTS;
}
cs->waiting = 1;
......
This diff is collapsed.
......@@ -164,7 +164,7 @@ void gigaset_dbg_buffer(enum debuglevel level, const unsigned char *msg,
#define BAS_CORRFRAMES 4 /* flow control multiplicator */
#define BAS_INBUFSIZE (BAS_MAXFRAME * BAS_NUMFRAMES)
/* size of isoc in buf per URB */
/* size of isoc in buf per URB */
#define BAS_OUTBUFSIZE 4096 /* size of common isoc out buffer */
#define BAS_OUTBUFPAD BAS_MAXFRAME /* size of pad area for isoc out buf */
......@@ -491,7 +491,7 @@ struct cardstate {
spinlock_t ev_lock;
/* current modem response */
unsigned char respdata[MAX_RESP_SIZE+1];
unsigned char respdata[MAX_RESP_SIZE + 1];
unsigned cbytes;
/* private data of hardware drivers */
......
......@@ -243,7 +243,7 @@ static int command_from_LL(isdn_ctrl *cntrl)
dev_kfree_skb(bcs->rx_skb);
gigaset_new_rx_skb(bcs);
commands = kzalloc(AT_NUM*(sizeof *commands), GFP_ATOMIC);
commands = kzalloc(AT_NUM * (sizeof *commands), GFP_ATOMIC);
if (!commands) {
gigaset_free_channel(bcs);
dev_err(cs->dev, "ISDN_CMD_DIAL: out of memory\n");
......@@ -261,7 +261,7 @@ static int command_from_LL(isdn_ctrl *cntrl)
if (!commands[AT_TYPE])
goto oom;
snprintf(commands[AT_DIAL], l,
"D%s\r", cntrl->parm.setup.phone+2);
"D%s\r", cntrl->parm.setup.phone + 2);
} else {
commands[AT_TYPE] = kstrdup("^SCTP=1\r", GFP_ATOMIC);
if (!commands[AT_TYPE])
......
......@@ -33,10 +33,10 @@ static int if_lock(struct cardstate *cs, int *arg)
}
if (!cmd && cs->mstate == MS_LOCKED && cs->connected) {
cs->ops->set_modem_ctrl(cs, 0, TIOCM_DTR|TIOCM_RTS);
cs->ops->set_modem_ctrl(cs, 0, TIOCM_DTR | TIOCM_RTS);
cs->ops->baud_rate(cs, B115200);
cs->ops->set_line_ctrl(cs, CS8);
cs->control_state = TIOCM_DTR|TIOCM_RTS;
cs->control_state = TIOCM_DTR | TIOCM_RTS;
}
cs->waiting = 1;
......@@ -299,7 +299,7 @@ static int if_tiocmget(struct tty_struct *tty)
if (mutex_lock_interruptible(&cs->mutex))
return -ERESTARTSYS;
retval = cs->control_state & (TIOCM_RTS|TIOCM_DTR);
retval = cs->control_state & (TIOCM_RTS | TIOCM_DTR);
mutex_unlock(&cs->mutex);
......@@ -329,7 +329,7 @@ static int if_tiocmset(struct tty_struct *tty,
gig_dbg(DEBUG_IF, "not connected");
retval = -ENODEV;
} else {
mc = (cs->control_state | set) & ~clear & (TIOCM_RTS|TIOCM_DTR);
mc = (cs->control_state | set) & ~clear & (TIOCM_RTS | TIOCM_DTR);
retval = cs->ops->set_modem_ctrl(cs, cs->control_state, mc);
cs->control_state = mc;
}
......
......@@ -56,7 +56,7 @@ static ssize_t set_cidmode(struct device *dev, struct device_attribute *attr,
return count;
}
static DEVICE_ATTR(cidmode, S_IRUGO|S_IWUSR, show_cidmode, set_cidmode);
static DEVICE_ATTR(cidmode, S_IRUGO | S_IWUSR, show_cidmode, set_cidmode);
/* free sysfs for device */
void gigaset_free_dev_sysfs(struct cardstate *cs)
......
......@@ -264,7 +264,7 @@ static inline void b1_put_byte(unsigned int base, unsigned char val)
static inline int b1_save_put_byte(unsigned int base, unsigned char val)
{
unsigned long stop = jiffies + 2 * HZ;
while (!b1_tx_empty(base) && time_before(jiffies,stop));
while (!b1_tx_empty(base) && time_before(jiffies, stop));
if (!b1_tx_empty(base)) return -1;
b1outp(base, B1_WRITE, val);
return 0;
......@@ -418,20 +418,20 @@ static inline unsigned int t1_get_slice(unsigned int base,
if (t1_isfastlink(base)) {
int status;
while (i > 0) {
status = t1_fifostatus(base) & (T1F_IREADY|T1F_IHALF);
status = t1_fifostatus(base) & (T1F_IREADY | T1F_IHALF);
if (i >= FIFO_INPBSIZE) status |= T1F_IFULL;
switch (status) {
case T1F_IREADY|T1F_IHALF|T1F_IFULL:
insb(base+B1_READ, dp, FIFO_INPBSIZE);
case T1F_IREADY | T1F_IHALF | T1F_IFULL:
insb(base + B1_READ, dp, FIFO_INPBSIZE);
dp += FIFO_INPBSIZE;
i -= FIFO_INPBSIZE;
#ifdef FASTLINK_DEBUG
wcnt += FIFO_INPBSIZE;
#endif
break;
case T1F_IREADY|T1F_IHALF:
insb(base+B1_READ,dp, i);
case T1F_IREADY | T1F_IHALF:
insb(base + B1_READ, dp, i);
#ifdef FASTLINK_DEBUG
wcnt += i;
#endif
......@@ -467,16 +467,16 @@ static inline void t1_put_slice(unsigned int base,
if (t1_isfastlink(base)) {
int status;
while (i > 0) {
status = t1_fifostatus(base) & (T1F_OREADY|T1F_OHALF);
status = t1_fifostatus(base) & (T1F_OREADY | T1F_OHALF);
if (i >= FIFO_OUTBSIZE) status |= T1F_OEMPTY;
switch (status) {
case T1F_OREADY|T1F_OHALF|T1F_OEMPTY:
outsb(base+B1_WRITE, dp, FIFO_OUTBSIZE);
case T1F_OREADY | T1F_OHALF | T1F_OEMPTY:
outsb(base + B1_WRITE, dp, FIFO_OUTBSIZE);
dp += FIFO_OUTBSIZE;
i -= FIFO_OUTBSIZE;
break;
case T1F_OREADY|T1F_OHALF:
outsb(base+B1_WRITE, dp, i);
case T1F_OREADY | T1F_OHALF:
outsb(base + B1_WRITE, dp, i);
dp += i;
i = 0;
break;
......@@ -543,8 +543,8 @@ avmcard *b1_alloc_card(int nr_controllers);
void b1_free_card(avmcard *card);
int b1_detect(unsigned int base, enum avmcardtype cardtype);
void b1_getrevision(avmcard *card);
int b1_load_t4file(avmcard *card, capiloaddatapart * t4file);
int b1_load_config(avmcard *card, capiloaddatapart * config);
int b1_load_t4file(avmcard *card, capiloaddatapart *t4file);
int b1_load_config(avmcard *card, capiloaddatapart *config);
int b1_loaded(avmcard *card);
int b1_load_firmware(struct capi_ctr *ctrl, capiloaddata *data);
......
......@@ -126,7 +126,7 @@ int b1_detect(unsigned int base, enum avmcardtype cardtype)
|| (inb(base + B1_OUTSTAT) & 0xfe))
return 3;
for (onoff = !0, i= 0; i < 10 ; i++) {
for (onoff = !0, i = 0; i < 10; i++) {
b1_set_test_bit(base, cardtype, onoff);
if (b1_get_test_bit(base, cardtype) != onoff)
return 4;
......@@ -149,7 +149,7 @@ void b1_getrevision(avmcard *card)
}
#define FWBUF_SIZE 256
int b1_load_t4file(avmcard *card, capiloaddatapart * t4file)
int b1_load_t4file(avmcard *card, capiloaddatapart *t4file)
{
unsigned char buf[FWBUF_SIZE];
unsigned char *dp;
......@@ -191,7 +191,7 @@ int b1_load_t4file(avmcard *card, capiloaddatapart * t4file)
return 0;
}
int b1_load_config(avmcard *card, capiloaddatapart * config)
int b1_load_config(avmcard *card, capiloaddatapart *config)
{
unsigned char buf[FWBUF_SIZE];
unsigned char *dp;
......@@ -215,7 +215,7 @@ int b1_load_config(avmcard *card, capiloaddatapart * config)
}
for (i = 0; i < FWBUF_SIZE; ) {
b1_put_byte(base, SEND_CONFIG);
for (j=0; j < 4; j++) {
for (j = 0; j < 4; j++) {
b1_put_byte(base, buf[i++]);
}
}
......@@ -231,7 +231,7 @@ int b1_load_config(avmcard *card, capiloaddatapart * config)
}
for (i = 0; i < left; ) {
b1_put_byte(base, SEND_CONFIG);
for (j=0; j < 4; j++) {
for (j = 0; j < 4; j++) {
if (i < left)
b1_put_byte(base, buf[i++]);
else
......@@ -312,7 +312,7 @@ int b1_load_firmware(struct capi_ctr *ctrl, capiloaddata *data)
b1_setinterrupt(port, card->irq, card->cardtype);
b1_put_byte(port, SEND_INIT);
b1_put_word(port, CAPI_MAXAPPL);
b1_put_word(port, AVM_NCCI_PER_CHANNEL*2);
b1_put_word(port, AVM_NCCI_PER_CHANNEL * 2);
b1_put_word(port, ctrl->cnr - 1);
spin_unlock_irqrestore(&card->lock, flags);
......@@ -353,7 +353,7 @@ void b1_register_appl(struct capi_ctr *ctrl,
spin_lock_irqsave(&card->lock, flags);
b1_put_byte(port, SEND_REGISTER);
b1_put_word(port, appl);
b1_put_word(port, 1024 * (nconn+1));
b1_put_word(port, 1024 * (nconn + 1));
b1_put_word(port, nconn);
b1_put_word(port, rp->datablkcnt);
b1_put_word(port, rp->datablklen);
......@@ -430,7 +430,7 @@ void b1_parse_version(avmctrl_info *cinfo)
cinfo->version[j] = &cinfo->versionbuf[i + 1];
strlcpy(ctrl->serial, cinfo->version[VER_SERIAL], sizeof(ctrl->serial));
memcpy(&ctrl->profile, cinfo->version[VER_PROFILE],sizeof(capi_profile));
memcpy(&ctrl->profile, cinfo->version[VER_PROFILE], sizeof(capi_profile));
strlcpy(ctrl->manu, "AVM GmbH", sizeof(ctrl->manu));
dversion = cinfo->version[VER_DRIVER];
ctrl->version.majorversion = 2;
......@@ -449,11 +449,11 @@ void b1_parse_version(avmctrl_info *cinfo)
strcpy(cinfo->cardname, cinfo->version[VER_CARDTYPE]);
else strcpy(cinfo->cardname, "B1");
break;
case 3: strcpy(cinfo->cardname,"PCMCIA B"); break;
case 4: strcpy(cinfo->cardname,"PCMCIA M1"); break;
case 5: strcpy(cinfo->cardname,"PCMCIA M2"); break;
case 6: strcpy(cinfo->cardname,"B1 V3.0"); break;
case 7: strcpy(cinfo->cardname,"B1 PCI"); break;
case 3: strcpy(cinfo->cardname, "PCMCIA B"); break;
case 4: strcpy(cinfo->cardname, "PCMCIA M1"); break;
case 5: strcpy(cinfo->cardname, "PCMCIA M2"); break;
case 6: strcpy(cinfo->cardname, "B1 V3.0"); break;
case 7: strcpy(cinfo->cardname, "B1 PCI"); break;
default: sprintf(cinfo->cardname, "AVM?%u", (unsigned int)flag); break;
}
printk(KERN_NOTICE "%s: card %d \"%s\" ready.\n",
......@@ -521,7 +521,7 @@ irqreturn_t b1_interrupt(int interrupt, void *devptr)
spin_unlock_irqrestore(&card->lock, flags);
if (MsgLen < 30) { /* not CAPI 64Bit */
memset(card->msgbuf+MsgLen, 0, 30-MsgLen);
memset(card->msgbuf + MsgLen, 0, 30-MsgLen);
MsgLen = 30;
CAPIMSG_SETLEN(card->msgbuf, 30);
}
......@@ -600,10 +600,10 @@ irqreturn_t b1_interrupt(int interrupt, void *devptr)
MsgLen = b1_get_slice(card->port, card->msgbuf);
spin_unlock_irqrestore(&card->lock, flags);
card->msgbuf[MsgLen] = 0;
while ( MsgLen > 0
&& ( card->msgbuf[MsgLen-1] == '\n'
|| card->msgbuf[MsgLen-1] == '\r')) {
card->msgbuf[MsgLen-1] = 0;
while (MsgLen > 0
&& (card->msgbuf[MsgLen - 1] == '\n'
|| card->msgbuf[MsgLen - 1] == '\r')) {
card->msgbuf[MsgLen - 1] = 0;
MsgLen--;
}
printk(KERN_INFO "%s: task %d \"%s\" ready.\n",
......@@ -614,10 +614,10 @@ irqreturn_t b1_interrupt(int interrupt, void *devptr)
MsgLen = b1_get_slice(card->port, card->msgbuf);
spin_unlock_irqrestore(&card->lock, flags);
card->msgbuf[MsgLen] = 0;
while ( MsgLen > 0
&& ( card->msgbuf[MsgLen-1] == '\n'
|| card->msgbuf[MsgLen-1] == '\r')) {
card->msgbuf[MsgLen-1] = 0;
while (MsgLen > 0
&& (card->msgbuf[MsgLen - 1] == '\n'
|| card->msgbuf[MsgLen - 1] == '\r')) {
card->msgbuf[MsgLen - 1] = 0;
MsgLen--;
}
printk(KERN_INFO "%s: DEBUG: %s\n", card->name, card->msgbuf);
......@@ -750,12 +750,12 @@ avmcard_dma_alloc(char *name, struct pci_dev *pdev, long rsize, long ssize)
return p;
err_free_consistent:
err_free_consistent:
pci_free_consistent(p->pcidev, p->recvbuf.size,
p->recvbuf.dmabuf, p->recvbuf.dmaaddr);
err_kfree:
err_kfree:
kfree(p);
err:
err:
return NULL;
}
......@@ -800,7 +800,7 @@ static int __init b1_init(void)
if ((p = strchr(revision, ':')) != NULL && p[1]) {
strlcpy(rev, p + 2, 32);
if ((p = strchr(rev, '$')) != NULL && p > rev)
*(p-1) = 0;
*(p - 1) = 0;
} else
strcpy(rev, "1.0");
......
......@@ -110,7 +110,7 @@ static int b1dma_tolink(avmcard *card, void *buf, unsigned int len)
unsigned long stop = jiffies + 1 * HZ; /* maximum wait time 1 sec */
unsigned char *s = (unsigned char *)buf;
while (len--) {
while ( !b1dma_tx_empty(card->port)
while (!b1dma_tx_empty(card->port)
&& time_before(jiffies, stop));
if (!b1dma_tx_empty(card->port))
return -1;
......@@ -124,7 +124,7 @@ static int b1dma_fromlink(avmcard *card, void *buf, unsigned int len)
unsigned long stop = jiffies + 1 * HZ; /* maximum wait time 1 sec */
unsigned char *s = (unsigned char *)buf;
while (len--) {
while ( !b1dma_rx_full(card->port)
while (!b1dma_rx_full(card->port)
&& time_before(jiffies, stop));
if (!b1dma_rx_full(card->port))
return -1;
......@@ -136,7 +136,7 @@ static int b1dma_fromlink(avmcard *card, void *buf, unsigned int len)
static int WriteReg(avmcard *card, u32 reg, u8 val)
{
u8 cmd = 0x00;
if ( b1dma_tolink(card, &cmd, 1) == 0
if (b1dma_tolink(card, &cmd, 1) == 0
&& b1dma_tolink(card, &reg, 4) == 0) {
u32 tmp = val;
return b1dma_tolink(card, &tmp, 4);
......@@ -147,7 +147,7 @@ static int WriteReg(avmcard *card, u32 reg, u8 val)
static u8 ReadReg(avmcard *card, u32 reg)
{
u8 cmd = 0x01;
if ( b1dma_tolink(card, &cmd, 1) == 0
if (b1dma_tolink(card, &cmd, 1) == 0
&& b1dma_tolink(card, &reg, 4) == 0) {
u32 tmp;
if (b1dma_fromlink(card, &tmp, 4) == 0)
......@@ -258,13 +258,13 @@ static int b1dma_detect(avmcard *card)
b1dma_writel(card, 0xffffffff, AMCC_RXPTR);
b1dma_writel(card, 0xffffffff, AMCC_TXPTR);
if ( b1dma_readl(card, AMCC_RXPTR) != 0xfffffffc
if (b1dma_readl(card, AMCC_RXPTR) != 0xfffffffc
|| b1dma_readl(card, AMCC_TXPTR) != 0xfffffffc)
return 2;
b1dma_writel(card, 0x0, AMCC_RXPTR);
b1dma_writel(card, 0x0, AMCC_TXPTR);
if ( b1dma_readl(card, AMCC_RXPTR) != 0x0
if (b1dma_readl(card, AMCC_RXPTR) != 0x0
|| b1dma_readl(card, AMCC_TXPTR) != 0x0)
return 3;
......@@ -274,14 +274,14 @@ static int b1dma_detect(avmcard *card)
t1outp(card->port, 0x02, 0x02);
t1outp(card->port, 0x03, 0x02);
if ( (t1inp(card->port, 0x02) & 0xFE) != 0x02
if ((t1inp(card->port, 0x02) & 0xFE) != 0x02
|| t1inp(card->port, 0x3) != 0x03)
return 4;
t1outp(card->port, 0x02, 0x00);
t1outp(card->port, 0x03, 0x00);
if ( (t1inp(card->port, 0x02) & 0xFE) != 0x00
if ((t1inp(card->port, 0x02) & 0xFE) != 0x00
|| t1inp(card->port, 0x3) != 0x01)
return 5;
......@@ -297,25 +297,25 @@ int t1pci_detect(avmcard *card)
/* Transputer test */
if ( WriteReg(card, 0x80001000, 0x11) != 0
if (WriteReg(card, 0x80001000, 0x11) != 0
|| WriteReg(card, 0x80101000, 0x22) != 0
|| WriteReg(card, 0x80201000, 0x33) != 0
|| WriteReg(card, 0x80301000, 0x44) != 0)
return 6;
if ( ReadReg(card, 0x80001000) != 0x11
if (ReadReg(card, 0x80001000) != 0x11
|| ReadReg(card, 0x80101000) != 0x22
|| ReadReg(card, 0x80201000) != 0x33
|| ReadReg(card, 0x80301000) != 0x44)
return 7;
if ( WriteReg(card, 0x80001000, 0x55) != 0
if (WriteReg(card, 0x80001000, 0x55) != 0
|| WriteReg(card, 0x80101000, 0x66) != 0
|| WriteReg(card, 0x80201000, 0x77) != 0
|| WriteReg(card, 0x80301000, 0x88) != 0)
return 8;
if ( ReadReg(card, 0x80001000) != 0x55
if (ReadReg(card, 0x80001000) != 0x55
|| ReadReg(card, 0x80101000) != 0x66
|| ReadReg(card, 0x80201000) != 0x77
|| ReadReg(card, 0x80301000) != 0x88)
......@@ -331,13 +331,13 @@ int b1pciv4_detect(avmcard *card)
if ((ret = b1dma_detect(card)) != 0)
return ret;
for (i=0; i < 5 ; i++) {
for (i = 0; i < 5; i++) {
if (WriteReg(card, 0x80A00000, 0x21) != 0)
return 6;
if ((ReadReg(card, 0x80A00000) & 0x01) != 0x01)
return 7;
}
for (i=0; i < 5 ; i++) {
for (i = 0; i < 5; i++) {
if (WriteReg(card, 0x80A00000, 0x20) != 0)
return 8;
if ((ReadReg(card, 0x80A00000) & 0x01) != 0x00)
......@@ -398,7 +398,7 @@ static void b1dma_dispatch_tx(avmcard *card)
printk(KERN_DEBUG "tx: put msg len=%d\n", txlen);
#endif
} else {
txlen = skb->len-2;
txlen = skb->len - 2;
#ifdef AVM_B1DMA_POLLDEBUG
if (skb->data[2] == SEND_POLLACK)
printk(KERN_INFO "%s: send ack\n", card->name);
......@@ -450,7 +450,7 @@ static void b1dma_handle_rx(avmcard *card)
avmcard_dmainfo *dma = card->dma;
struct capi_ctr *ctrl = &cinfo->capi_ctrl;
struct sk_buff *skb;
void *p = dma->recvbuf.dmabuf+4;
void *p = dma->recvbuf.dmabuf + 4;
u32 ApplId, MsgLen, DataB3Len, NCCI, WindowSize;
u8 b1cmd = _get_byte(&p);
......@@ -466,11 +466,11 @@ static void b1dma_handle_rx(avmcard *card)
DataB3Len = _get_slice(&p, card->databuf);
if (MsgLen < 30) { /* not CAPI 64Bit */
memset(card->msgbuf+MsgLen, 0, 30-MsgLen);
memset(card->msgbuf + MsgLen, 0, 30 - MsgLen);
MsgLen = 30;
CAPIMSG_SETLEN(card->msgbuf, 30);
}
if (!(skb = alloc_skb(DataB3Len+MsgLen, GFP_ATOMIC))) {
if (!(skb = alloc_skb(DataB3Len + MsgLen, GFP_ATOMIC))) {
printk(KERN_ERR "%s: incoming packet dropped\n",
card->name);
} else {
......@@ -550,10 +550,10 @@ static void b1dma_handle_rx(avmcard *card)
ApplId = (unsigned) _get_word(&p);
MsgLen = _get_slice(&p, card->msgbuf);
card->msgbuf[MsgLen] = 0;
while ( MsgLen > 0
&& ( card->msgbuf[MsgLen-1] == '\n'
|| card->msgbuf[MsgLen-1] == '\r')) {
card->msgbuf[MsgLen-1] = 0;
while (MsgLen > 0
&& (card->msgbuf[MsgLen - 1] == '\n'
|| card->msgbuf[MsgLen - 1] == '\r')) {
card->msgbuf[MsgLen - 1] = 0;
MsgLen--;
}
printk(KERN_INFO "%s: task %d \"%s\" ready.\n",
......@@ -563,10 +563,10 @@ static void b1dma_handle_rx(avmcard *card)
case RECEIVE_DEBUGMSG:
MsgLen = _get_slice(&p, card->msgbuf);
card->msgbuf[MsgLen] = 0;
while ( MsgLen > 0
&& ( card->msgbuf[MsgLen-1] == '\n'
|| card->msgbuf[MsgLen-1] == '\r')) {
card->msgbuf[MsgLen-1] = 0;
while (MsgLen > 0
&& (card->msgbuf[MsgLen - 1] == '\n'
|| card->msgbuf[MsgLen - 1] == '\r')) {
card->msgbuf[MsgLen - 1] = 0;
MsgLen--;
}
printk(KERN_INFO "%s: DEBUG: %s\n", card->name, card->msgbuf);
......@@ -607,7 +607,7 @@ static void b1dma_handle_interrupt(avmcard *card)
if (rxlen == 0) {
dma->recvlen = *((u32 *)dma->recvbuf.dmabuf);
rxlen = (dma->recvlen + 3) & ~3;
b1dma_writel(card, dma->recvbuf.dmaaddr+4, AMCC_RXPTR);
b1dma_writel(card, dma->recvbuf.dmaaddr + 4, AMCC_RXPTR);
b1dma_writel(card, rxlen, AMCC_RXLEN);
#ifdef AVM_B1DMA_DEBUG
} else {
......@@ -694,7 +694,7 @@ static void b1dma_send_init(avmcard *card)
_put_byte(&p, 0);
_put_byte(&p, SEND_INIT);
_put_word(&p, CAPI_MAXAPPL);
_put_word(&p, AVM_NCCI_PER_CHANNEL*30);
_put_word(&p, AVM_NCCI_PER_CHANNEL * 30);
_put_word(&p, card->cardnr - 1);
skb_put(skb, (u8 *)p - (u8 *)skb->data);
......@@ -733,8 +733,8 @@ int b1dma_load_firmware(struct capi_ctr *ctrl, capiloaddata *data)
card->csr = AVM_FLAG;
b1dma_writel(card, card->csr, AMCC_INTCSR);
b1dma_writel(card, EN_A2P_TRANSFERS|EN_P2A_TRANSFERS|A2P_HI_PRIORITY|
P2A_HI_PRIORITY|RESET_A2P_FLAGS|RESET_P2A_FLAGS,
b1dma_writel(card, EN_A2P_TRANSFERS | EN_P2A_TRANSFERS | A2P_HI_PRIORITY |
P2A_HI_PRIORITY | RESET_A2P_FLAGS | RESET_P2A_FLAGS,
AMCC_MCSR);
t1outp(card->port, 0x07, 0x30);
t1outp(card->port, 0x10, 0xF0);
......@@ -793,7 +793,7 @@ void b1dma_register_appl(struct capi_ctr *ctrl,
_put_byte(&p, 0);
_put_byte(&p, SEND_REGISTER);
_put_word(&p, appl);
_put_word(&p, 1024 * (nconn+1));
_put_word(&p, 1024 * (nconn + 1));
_put_word(&p, nconn);
_put_word(&p, rp->datablkcnt);
_put_word(&p, rp->datablklen);
......@@ -977,7 +977,7 @@ static int __init b1dma_init(void)
if ((p = strchr(revision, ':')) != NULL && p[1]) {
strlcpy(rev, p + 2, sizeof(rev));
if ((p = strchr(rev, '$')) != NULL && p > rev)
*(p-1) = 0;
*(p - 1) = 0;
} else
strcpy(rev, "1.0");
......
......@@ -80,7 +80,7 @@ static int b1isa_probe(struct pci_dev *pdev)
card->cardtype = avm_b1isa;
sprintf(card->name, "b1isa-%x", card->port);
if ( card->port != 0x150 && card->port != 0x250
if (card->port != 0x150 && card->port != 0x250
&& card->port != 0x300 && card->port != 0x340) {
printk(KERN_WARNING "b1isa: invalid port 0x%x.\n", card->port);
retval = -EINVAL;
......@@ -136,13 +136,13 @@ static int b1isa_probe(struct pci_dev *pdev)
pci_set_drvdata(pdev, cinfo);
return 0;
err_free_irq:
err_free_irq:
free_irq(card->irq, card);
err_release_region:
err_release_region:
release_region(card->port, AVMB1_PORTLEN);
err_free:
err_free:
b1_free_card(card);
err:
err:
return retval;
}
......@@ -206,7 +206,7 @@ static int __init b1isa_init(void)
if ((p = strchr(revision, ':')) != NULL && p[1]) {
strlcpy(rev, p + 2, 32);
if ((p = strchr(rev, '$')) != NULL && p > rev)
*(p-1) = 0;
*(p - 1) = 0;
} else
strcpy(rev, "1.0");
......
......@@ -133,13 +133,13 @@ static int b1pci_probe(struct capicardparams *p, struct pci_dev *pdev)
pci_set_drvdata(pdev, card);
return 0;
err_free_irq:
err_free_irq:
free_irq(card->irq, card);
err_release_region:
err_release_region:
release_region(card->port, AVMB1_PORTLEN);
err_free:
err_free:
b1_free_card(card);
err:
err:
return retval;
}
......@@ -193,7 +193,7 @@ static int b1pciv4_probe(struct capicardparams *p, struct pci_dev *pdev)
goto err;
}
card->dma = avmcard_dma_alloc("b1pci", pdev, 2048+128, 2048+128);
card->dma = avmcard_dma_alloc("b1pci", pdev, 2048 + 128, 2048 + 128);
if (!card->dma) {
printk(KERN_WARNING "b1pci: dma alloc.\n");
retval = -ENOMEM;
......@@ -267,17 +267,17 @@ static int b1pciv4_probe(struct capicardparams *p, struct pci_dev *pdev)
pci_set_drvdata(pdev, card);
return 0;
err_free_irq:
err_free_irq:
free_irq(card->irq, card);
err_unmap:
err_unmap:
iounmap(card->mbase);
err_release_region:
err_release_region:
release_region(card->port, AVMB1_PORTLEN);
err_free_dma:
err_free_dma:
avmcard_dma_free(card->dma);
err_free:
err_free:
b1_free_card(card);
err:
err:
return retval;
}
......@@ -385,7 +385,7 @@ static int __init b1pci_init(void)
if ((p = strchr(revision, ':')) != NULL && p[1]) {
strlcpy(rev, p + 2, 32);
if ((p = strchr(rev, '$')) != NULL && p > rev)
*(p-1) = 0;
*(p - 1) = 0;
} else
strcpy(rev, "1.0");
......
......@@ -119,7 +119,7 @@ static int b1pcmcia_add_card(unsigned int port, unsigned irq,
switch (cardtype) {
case avm_m1: cardname = "M1"; break;
case avm_m2: cardname = "M2"; break;
default : cardname = "B1 PCMCIA"; break;
default: cardname = "B1 PCMCIA"; break;
}
printk(KERN_INFO "b1pcmcia: AVM %s at i/o %#x, irq %d, revision %d\n",
......@@ -128,11 +128,11 @@ static int b1pcmcia_add_card(unsigned int port, unsigned irq,
list_add(&card->list, &cards);
return cinfo->capi_ctrl.cnr;
err_free_irq:
err_free_irq:
free_irq(card->irq, card);
err_free:
err_free:
b1_free_card(card);
err:
err:
return retval;
}
......@@ -204,7 +204,7 @@ static int __init b1pcmcia_init(void)
if ((p = strchr(revision, ':')) != NULL && p[1]) {
strlcpy(rev, p + 2, 32);
if ((p = strchr(rev, '$')) != NULL && p > rev)
*(p-1) = 0;
*(p - 1) = 0;
} else
strcpy(rev, "1.0");
......
This diff is collapsed.
......@@ -86,48 +86,48 @@ static int t1_detectandinit(unsigned int base, unsigned irq, int cardnr)
/* board reset */
t1outp(base, T1_RESETBOARD, 0xf);
mdelay(100);
dummy = t1inp(base, T1_FASTLINK+T1_OUTSTAT); /* first read */
dummy = t1inp(base, T1_FASTLINK + T1_OUTSTAT); /* first read */
/* write config */
dummy = (base >> 4) & 0xff;
for (i=1;i<=0xf;i++) t1outp(base, i, dummy);
for (i = 1; i <= 0xf; i++) t1outp(base, i, dummy);
t1outp(base, HEMA_PAL_ID & 0xf, dummy);
t1outp(base, HEMA_PAL_ID >> 4, cregs[0]);
for(i=1;i<7;i++) t1outp(base, 0, cregs[i]);
for (i = 1; i < 7; i++) t1outp(base, 0, cregs[i]);
t1outp(base, ((base >> 4)) & 0x3, cregs[7]);
/* restore_flags(flags); */
mdelay(100);
t1outp(base, T1_FASTLINK+T1_RESETLINK, 0);
t1outp(base, T1_SLOWLINK+T1_RESETLINK, 0);
t1outp(base, T1_FASTLINK + T1_RESETLINK, 0);
t1outp(base, T1_SLOWLINK + T1_RESETLINK, 0);
mdelay(10);
t1outp(base, T1_FASTLINK+T1_RESETLINK, 1);
t1outp(base, T1_SLOWLINK+T1_RESETLINK, 1);
t1outp(base, T1_FASTLINK + T1_RESETLINK, 1);
t1outp(base, T1_SLOWLINK + T1_RESETLINK, 1);
mdelay(100);
t1outp(base, T1_FASTLINK+T1_RESETLINK, 0);
t1outp(base, T1_SLOWLINK+T1_RESETLINK, 0);
t1outp(base, T1_FASTLINK + T1_RESETLINK, 0);
t1outp(base, T1_SLOWLINK + T1_RESETLINK, 0);
mdelay(10);
t1outp(base, T1_FASTLINK+T1_ANALYSE, 0);
t1outp(base, T1_FASTLINK + T1_ANALYSE, 0);
mdelay(5);
t1outp(base, T1_SLOWLINK+T1_ANALYSE, 0);
t1outp(base, T1_SLOWLINK + T1_ANALYSE, 0);
if (t1inp(base, T1_FASTLINK+T1_OUTSTAT) != 0x1) /* tx empty */
if (t1inp(base, T1_FASTLINK + T1_OUTSTAT) != 0x1) /* tx empty */
return 1;
if (t1inp(base, T1_FASTLINK+T1_INSTAT) != 0x0) /* rx empty */
if (t1inp(base, T1_FASTLINK + T1_INSTAT) != 0x0) /* rx empty */
return 2;
if (t1inp(base, T1_FASTLINK+T1_IRQENABLE) != 0x0)
if (t1inp(base, T1_FASTLINK + T1_IRQENABLE) != 0x0)
return 3;
if ((t1inp(base, T1_FASTLINK+T1_FIFOSTAT) & 0xf0) != 0x70)
if ((t1inp(base, T1_FASTLINK + T1_FIFOSTAT) & 0xf0) != 0x70)
return 4;
if ((t1inp(base, T1_FASTLINK+T1_IRQMASTER) & 0x0e) != 0)
if ((t1inp(base, T1_FASTLINK + T1_IRQMASTER) & 0x0e) != 0)
return 5;
if ((t1inp(base, T1_FASTLINK+T1_IDENT) & 0x7d) != 1)
if ((t1inp(base, T1_FASTLINK + T1_IDENT) & 0x7d) != 1)
return 6;
if (t1inp(base, T1_SLOWLINK+T1_OUTSTAT) != 0x1) /* tx empty */
if (t1inp(base, T1_SLOWLINK + T1_OUTSTAT) != 0x1) /* tx empty */
return 7;
if ((t1inp(base, T1_SLOWLINK+T1_IRQMASTER) & 0x0e) != 0)
if ((t1inp(base, T1_SLOWLINK + T1_IRQMASTER) & 0x0e) != 0)
return 8;
if ((t1inp(base, T1_SLOWLINK+T1_IDENT) & 0x7d) != 0)
if ((t1inp(base, T1_SLOWLINK + T1_IDENT) & 0x7d) != 0)
return 9;
return 0;
}
......@@ -163,11 +163,11 @@ static irqreturn_t t1isa_interrupt(int interrupt, void *devptr)
spin_unlock_irqrestore(&card->lock, flags);
if (MsgLen < 30) { /* not CAPI 64Bit */
memset(card->msgbuf+MsgLen, 0, 30-MsgLen);
memset(card->msgbuf + MsgLen, 0, 30 - MsgLen);
MsgLen = 30;
CAPIMSG_SETLEN(card->msgbuf, 30);
}
if (!(skb = alloc_skb(DataB3Len+MsgLen, GFP_ATOMIC))) {
if (!(skb = alloc_skb(DataB3Len + MsgLen, GFP_ATOMIC))) {
printk(KERN_ERR "%s: incoming packet dropped\n",
card->name);
} else {
......@@ -242,10 +242,10 @@ static irqreturn_t t1isa_interrupt(int interrupt, void *devptr)
MsgLen = t1_get_slice(card->port, card->msgbuf);
spin_unlock_irqrestore(&card->lock, flags);
card->msgbuf[MsgLen] = 0;
while ( MsgLen > 0
&& ( card->msgbuf[MsgLen-1] == '\n'
|| card->msgbuf[MsgLen-1] == '\r')) {
card->msgbuf[MsgLen-1] = 0;
while (MsgLen > 0
&& (card->msgbuf[MsgLen - 1] == '\n'
|| card->msgbuf[MsgLen - 1] == '\r')) {
card->msgbuf[MsgLen - 1] = 0;
MsgLen--;
}
printk(KERN_INFO "%s: task %d \"%s\" ready.\n",
......@@ -256,10 +256,10 @@ static irqreturn_t t1isa_interrupt(int interrupt, void *devptr)
MsgLen = t1_get_slice(card->port, card->msgbuf);
spin_unlock_irqrestore(&card->lock, flags);
card->msgbuf[MsgLen] = 0;
while ( MsgLen > 0
&& ( card->msgbuf[MsgLen-1] == '\n'
|| card->msgbuf[MsgLen-1] == '\r')) {
card->msgbuf[MsgLen-1] = 0;
while (MsgLen > 0
&& (card->msgbuf[MsgLen - 1] == '\n'
|| card->msgbuf[MsgLen - 1] == '\r')) {
card->msgbuf[MsgLen - 1] = 0;
MsgLen--;
}
printk(KERN_INFO "%s: DEBUG: %s\n", card->name, card->msgbuf);
......@@ -318,7 +318,7 @@ static int t1isa_load_firmware(struct capi_ctr *ctrl, capiloaddata *data)
b1_setinterrupt(port, card->irq, card->cardtype);
b1_put_byte(port, SEND_INIT);
b1_put_word(port, CAPI_MAXAPPL);
b1_put_word(port, AVM_NCCI_PER_CHANNEL*30);
b1_put_word(port, AVM_NCCI_PER_CHANNEL * 30);
b1_put_word(port, ctrl->cnr - 1);
spin_unlock_irqrestore(&card->lock, flags);
......@@ -445,13 +445,13 @@ static int t1isa_probe(struct pci_dev *pdev, int cardnr)
pci_set_drvdata(pdev, cinfo);
return 0;
err_free_irq:
err_free_irq:
free_irq(card->irq, card);
err_release_region:
err_release_region:
release_region(card->port, AVMB1_PORTLEN);
err_free:
err_free:
b1_free_card(card);
err:
err:
return retval;
}
......@@ -555,7 +555,7 @@ static int __init t1isa_init(void)
if ((p = strchr(revision, ':')) != NULL && p[1]) {
strlcpy(rev, p + 2, 32);
if ((p = strchr(rev, '$')) != NULL && p > rev)
*(p-1) = 0;
*(p - 1) = 0;
} else
strcpy(rev, "1.0");
......
......@@ -59,7 +59,7 @@ static int t1pci_add_card(struct capicardparams *p, struct pci_dev *pdev)
goto err;
}
card->dma = avmcard_dma_alloc("t1pci", pdev, 2048+128, 2048+128);
card->dma = avmcard_dma_alloc("t1pci", pdev, 2048 + 128, 2048 + 128);
if (!card->dma) {
printk(KERN_WARNING "t1pci: no memory.\n");
retval = -ENOMEM;
......@@ -136,17 +136,17 @@ static int t1pci_add_card(struct capicardparams *p, struct pci_dev *pdev)
pci_set_drvdata(pdev, card);
return 0;
err_free_irq:
err_free_irq:
free_irq(card->irq, card);
err_unmap:
err_unmap:
iounmap(card->mbase);
err_release_region:
err_release_region:
release_region(card->port, AVMB1_PORTLEN);
err_free_dma:
err_free_dma:
avmcard_dma_free(card->dma);
err_free:
err_free:
b1_free_card(card);
err:
err:
return retval;
}
......@@ -237,7 +237,7 @@ static int __init t1pci_init(void)
if ((p = strchr(revision, ':')) != NULL && p[1]) {
strlcpy(rev, p + 2, 32);
if ((p = strchr(rev, '$')) != NULL && p > rev)
*(p-1) = 0;
*(p - 1) = 0;
} else
strcpy(rev, "1.0");
......
This diff is collapsed.
......@@ -182,7 +182,7 @@ static byte capidtmf_leading_zeroes_table[0x100] =
/*---------------------------------------------------------------------------*/
static void capidtmf_goertzel_loop (long *buffer, long *coeffs, short *sample, long count)
static void capidtmf_goertzel_loop(long *buffer, long *coeffs, short *sample, long count)
{
int i, j;
long c, d, q0, q1, q2;
......@@ -246,7 +246,7 @@ static void capidtmf_goertzel_loop (long *buffer, long *coeffs, short *sample, l
}
static void capidtmf_goertzel_result (long *buffer, long *coeffs)
static void capidtmf_goertzel_result(long *buffer, long *coeffs)
{
int i;
long d, e, q1, q2, lo, mid, hi;
......@@ -409,7 +409,7 @@ static word capidtmf_recv_guard_snr_high_table[CAPIDTMF_RECV_TOTAL_FREQUENCY_COU
/*---------------------------------------------------------------------------*/
static void capidtmf_recv_init (t_capidtmf_state *p_state)
static void capidtmf_recv_init(t_capidtmf_state *p_state)
{
p_state->recv.min_gap_duration = 1;
p_state->recv.min_digit_duration = 1;
......@@ -427,7 +427,7 @@ static void capidtmf_recv_init (t_capidtmf_state *p_state)
}
void capidtmf_recv_enable (t_capidtmf_state *p_state, word min_digit_duration, word min_gap_duration)
void capidtmf_recv_enable(t_capidtmf_state *p_state, word min_digit_duration, word min_gap_duration)
{
p_state->recv.indication_state_ack &= CAPIDTMF_RECV_INDICATION_DIGIT;
p_state->recv.min_digit_duration = (word)(((((dword) min_digit_duration) * 8) +
......@@ -446,11 +446,11 @@ void capidtmf_recv_enable (t_capidtmf_state *p_state, word min_digit_duration,
}
void capidtmf_recv_disable (t_capidtmf_state *p_state)
void capidtmf_recv_disable(t_capidtmf_state *p_state)
{
p_state->recv.state &= ~CAPIDTMF_RECV_STATE_DTMF_ACTIVE;
if (p_state->recv.state == CAPIDTMF_RECV_STATE_IDLE)
capidtmf_recv_init (p_state);
capidtmf_recv_init(p_state);
else
{
p_state->recv.cycle_counter = 0;
......@@ -461,7 +461,7 @@ void capidtmf_recv_disable (t_capidtmf_state *p_state)
}
word capidtmf_recv_indication (t_capidtmf_state *p_state, byte *buffer)
word capidtmf_recv_indication(t_capidtmf_state *p_state, byte *buffer)
{
word i, j, k, flags;
......@@ -487,7 +487,7 @@ word capidtmf_recv_indication (t_capidtmf_state *p_state, byte *buffer)
#define CAPIDTMF_RECV_WINDOWED_SAMPLES 32
void capidtmf_recv_block (t_capidtmf_state *p_state, byte *buffer, word length)
void capidtmf_recv_block(t_capidtmf_state *p_state, byte *buffer, word length)
{
byte result_digit;
word sample_number, cycle_counter, n, i;
......@@ -539,14 +539,14 @@ void capidtmf_recv_block (t_capidtmf_state *p_state, byte *buffer, word leng
}
}
capidtmf_recv_goertzel_coef_table[CAPIDTMF_RECV_TOTAL_FREQUENCY_COUNT - 1] = CAPIDTMF_RECV_FUNDAMENTAL_OFFSET;
capidtmf_goertzel_loop (p_state->recv.goertzel_buffer[0],
capidtmf_goertzel_loop(p_state->recv.goertzel_buffer[0],
capidtmf_recv_goertzel_coef_table, windowed_sample_buffer, n);
cycle_counter += n;
sample_number += n;
}
else
{
capidtmf_goertzel_result (p_state->recv.goertzel_buffer[0],
capidtmf_goertzel_result(p_state->recv.goertzel_buffer[0],
capidtmf_recv_goertzel_coef_table);
for (i = 0; i < CAPIDTMF_RECV_TOTAL_FREQUENCY_COUNT; i++)
{
......@@ -554,12 +554,12 @@ void capidtmf_recv_block (t_capidtmf_state *p_state, byte *buffer, word leng
hi = (dword)(p_state->recv.goertzel_buffer[1][i]);
if (hi != 0)
{
n = capidtmf_dword_leading_zeroes (hi);
n = capidtmf_dword_leading_zeroes(hi);
hi = (hi << n) | (lo >> (32 - n));
}
else
{
n = capidtmf_dword_leading_zeroes (lo);
n = capidtmf_dword_leading_zeroes(lo);
hi = lo << n;
n += 32;
}
......@@ -651,7 +651,7 @@ void capidtmf_recv_block (t_capidtmf_state *p_state, byte *buffer, word leng
0 : p_state->recv.digit_write_pos + 1;
if (i == p_state->recv.digit_read_pos)
{
trace (dprintf ("%s,%d: Receive digit overrun",
trace(dprintf("%s,%d: Receive digit overrun",
(char *)(FILE_), __LINE__));
}
else
......@@ -675,10 +675,10 @@ void capidtmf_recv_block (t_capidtmf_state *p_state, byte *buffer, word leng
}
void capidtmf_init (t_capidtmf_state *p_state, byte ulaw)
void capidtmf_init(t_capidtmf_state *p_state, byte ulaw)
{
p_state->ulaw = ulaw;
capidtmf_recv_init (p_state);
capidtmf_recv_init(p_state);
}
......
......@@ -67,13 +67,13 @@ typedef struct tag_capidtmf_state
byte ulaw;
t_capidtmf_recv_state recv;
} t_capidtmf_state;
word capidtmf_recv_indication (t_capidtmf_state *p_state, byte *buffer);
void capidtmf_recv_block (t_capidtmf_state *p_state, byte *buffer, word length);
void capidtmf_init (t_capidtmf_state *p_state, byte ulaw);
void capidtmf_recv_enable (t_capidtmf_state *p_state, word min_digit_duration, word min_gap_duration);
void capidtmf_recv_disable (t_capidtmf_state *p_state);
#define capidtmf_indication(p_state,buffer) (((p_state)->recv.indication_state != (p_state)->recv.indication_state_ack) ? capidtmf_recv_indication (p_state, buffer) : 0)
#define capidtmf_recv_process_block(p_state,buffer,length) { if ((p_state)->recv.state != CAPIDTMF_RECV_STATE_IDLE) capidtmf_recv_block (p_state, buffer, length); }
word capidtmf_recv_indication(t_capidtmf_state *p_state, byte *buffer);
void capidtmf_recv_block(t_capidtmf_state *p_state, byte *buffer, word length);
void capidtmf_init(t_capidtmf_state *p_state, byte ulaw);
void capidtmf_recv_enable(t_capidtmf_state *p_state, word min_digit_duration, word min_gap_duration);
void capidtmf_recv_disable(t_capidtmf_state *p_state);
#define capidtmf_indication(p_state, buffer) (((p_state)->recv.indication_state != (p_state)->recv.indication_state_ack) ? capidtmf_recv_indication(p_state, buffer) : 0)
#define capidtmf_recv_process_block(p_state, buffer, length) { if ((p_state)->recv.state != CAPIDTMF_RECV_STATE_IDLE) capidtmf_recv_block(p_state, buffer, length); }
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/
#endif
......@@ -43,7 +43,7 @@ static diva_os_spin_lock_t api_lock;
static LIST_HEAD(cards);
static dword notify_handle;
static void DIRequest(ENTITY * e);
static void DIRequest(ENTITY *e);
static DESCRIPTOR MAdapter;
static DESCRIPTOR DAdapter;
static byte ControllerMap[MAX_DESCRIPTORS + 1];
......@@ -160,7 +160,7 @@ static int find_free_id(void)
break;
num++;
}
return(num + 1);
return (num + 1);
}
/*
......@@ -176,7 +176,7 @@ static diva_card *find_card_by_ctrl(word controller)
if (ControllerMap[card->Id] == controller) {
if (card->remove_in_progress)
card = NULL;
return(card);
return (card);
}
}
return (diva_card *) 0;
......@@ -185,14 +185,14 @@ static diva_card *find_card_by_ctrl(word controller)
/*
* Buffer RX/TX
*/
void *TransmitBufferSet(APPL * appl, dword ref)
void *TransmitBufferSet(APPL *appl, dword ref)
{
appl->xbuffer_used[ref] = true;
DBG_PRV1(("%d:xbuf_used(%d)", appl->Id, ref + 1))
return (void *)(long)ref;
}
void *TransmitBufferGet(APPL * appl, void *p)
void *TransmitBufferGet(APPL *appl, void *p)
{
if (appl->xbuffer_internal[(dword)(long)p])
return appl->xbuffer_internal[(dword)(long)p];
......@@ -200,13 +200,13 @@ void *TransmitBufferGet(APPL * appl, void *p)
return appl->xbuffer_ptr[(dword)(long)p];
}
void TransmitBufferFree(APPL * appl, void *p)
void TransmitBufferFree(APPL *appl, void *p)
{
appl->xbuffer_used[(dword)(long)p] = false;
DBG_PRV1(("%d:xbuf_free(%d)", appl->Id, ((dword)(long)p) + 1))
}
}
void *ReceiveBufferGet(APPL * appl, int Num)
void *ReceiveBufferGet(APPL *appl, int Num)
{
return &appl->ReceiveBuffer[Num * appl->MaxDataLength];
}
......@@ -217,12 +217,12 @@ void *ReceiveBufferGet(APPL * appl, int Num)
void api_remove_complete(void)
{
DBG_PRV1(("api_remove_complete"))
}
}
/*
* main function called by message.c
*/
void sendf(APPL * appl, word command, dword Id, word Number, byte * format, ...)
void sendf(APPL *appl, word command, dword Id, word Number, byte *format, ...)
{
word i, j;
word length = 12, dlength = 0;
......@@ -247,7 +247,7 @@ void sendf(APPL * appl, word command, dword Id, word Number, byte * format, ...)
PUT_WORD(&msg.header.number, Number);
PUT_DWORD(&msg.header.controller, Id);
write = (byte *) & msg;
write = (byte *)&msg;
write += 12;
va_start(ap, format);
......@@ -287,7 +287,7 @@ void sendf(APPL * appl, word command, dword Id, word Number, byte * format, ...)
if (command == _DATA_B3_I)
dlength = GET_WORD(
((byte *) & msg.info.data_b3_ind.Data_Length));
((byte *)&msg.info.data_b3_ind.Data_Length));
if (!(dmb = diva_os_alloc_message_buffer(length + dlength,
(void **) &write))) {
......@@ -296,7 +296,7 @@ void sendf(APPL * appl, word command, dword Id, word Number, byte * format, ...)
}
/* copy msg header to sk_buff */
memcpy(write, (byte *) & msg, length);
memcpy(write, (byte *)&msg, length);
/* if DATA_B3_IND, copy data too */
if (command == _DATA_B3_I) {
......@@ -388,7 +388,7 @@ static void clean_adapter(int id, struct list_head *free_mem_q)
* remove a card, but ensures consistent state of LI tables
* in the time adapter is removed
*/
static void divacapi_remove_card(DESCRIPTOR * d)
static void divacapi_remove_card(DESCRIPTOR *d)
{
diva_card *card = NULL;
diva_os_spin_lock_magic_t old_irql;
......@@ -434,7 +434,7 @@ static void divacapi_remove_card(DESCRIPTOR * d)
diva_os_leave_spin_lock(&api_lock, &old_irql, "remove card");
/* After releasing the lock, we can free the memory */
diva_os_free (0, card);
diva_os_free(0, card);
}
/* free queued memory areas */
......@@ -469,7 +469,7 @@ static void divacapi_remove_cards(void)
/*
* sync_callback
*/
static void sync_callback(ENTITY * e)
static void sync_callback(ENTITY *e)
{
diva_os_spin_lock_magic_t old_irql;
......@@ -483,7 +483,7 @@ static void sync_callback(ENTITY * e)
/*
* add a new card
*/
static int diva_add_card(DESCRIPTOR * d)
static int diva_add_card(DESCRIPTOR *d)
{
int k = 0, i = 0;
diva_os_spin_lock_magic_t old_irql;
......@@ -492,7 +492,7 @@ static int diva_add_card(DESCRIPTOR * d)
DIVA_CAPI_ADAPTER *a = NULL;
IDI_SYNC_REQ sync_req;
char serial[16];
void* mem_to_free;
void *mem_to_free;
LI_CONFIG *new_li_config_table;
int j;
......@@ -504,7 +504,7 @@ static int diva_add_card(DESCRIPTOR * d)
memcpy(&card->d, d, sizeof(DESCRIPTOR));
sync_req.GetName.Req = 0;
sync_req.GetName.Rc = IDI_SYNC_REQ_GET_NAME;
card->d.request((ENTITY *) & sync_req);
card->d.request((ENTITY *)&sync_req);
strlcpy(card->name, sync_req.GetName.name, sizeof(card->name));
ctrl = &card->capi_ctrl;
strcpy(ctrl->name, card->name);
......@@ -533,7 +533,7 @@ static int diva_add_card(DESCRIPTOR * d)
sync_req.GetSerial.Req = 0;
sync_req.GetSerial.Rc = IDI_SYNC_REQ_GET_SERIAL;
sync_req.GetSerial.serial = 0;
card->d.request((ENTITY *) & sync_req);
card->d.request((ENTITY *)&sync_req);
if ((i = ((sync_req.GetSerial.serial & 0xff000000) >> 24))) {
sprintf(serial, "%ld-%d",
sync_req.GetSerial.serial & 0x00ffffff, i + 1);
......@@ -554,7 +554,7 @@ static int diva_add_card(DESCRIPTOR * d)
sync_req.xdi_capi_prms.Rc = IDI_SYNC_REQ_XDI_GET_CAPI_PARAMS;
sync_req.xdi_capi_prms.info.structure_length =
sizeof(diva_xdi_get_capi_parameters_t);
card->d.request((ENTITY *) & sync_req);
card->d.request((ENTITY *)&sync_req);
a->flag_dynamic_l1_down =
sync_req.xdi_capi_prms.info.flag_dynamic_l1_down;
a->group_optimization_enabled =
......@@ -689,7 +689,7 @@ static int diva_add_card(DESCRIPTOR * d)
diva_os_leave_spin_lock(&api_lock, &old_irql, "add card");
if (mem_to_free) {
diva_os_free (0, mem_to_free);
diva_os_free(0, mem_to_free);
}
i = 0;
......@@ -722,7 +722,7 @@ static int diva_add_card(DESCRIPTOR * d)
* register appl
*/
static void diva_register_appl(struct capi_ctr *ctrl, __u16 appl,
capi_register_params * rp)
capi_register_params *rp)
{
APPL *this;
word bnum, xnum;
......@@ -876,7 +876,7 @@ static void diva_release_appl(struct capi_ctr *ctrl, __u16 appl)
* send message
*/
static u16 diva_send_message(struct capi_ctr *ctrl,
diva_os_message_buffer_s * dmb)
diva_os_message_buffer_s *dmb)
{
int i = 0;
word ret = 0;
......@@ -996,7 +996,7 @@ static u16 diva_send_message(struct capi_ctr *ctrl,
break;
}
write_end:
write_end:
diva_os_leave_spin_lock(&api_lock, &old_irql, "send message");
if (retval == CAPI_NOERROR)
diva_os_free_message_buffer(dmb);
......@@ -1007,7 +1007,7 @@ static u16 diva_send_message(struct capi_ctr *ctrl,
/*
* cards request function
*/
static void DIRequest(ENTITY * e)
static void DIRequest(ENTITY *e)
{
DIVA_CAPI_ADAPTER *a = &(adapter[(byte) e->user[0]]);
diva_card *os_card = (diva_card *) a->os_card;
......@@ -1022,7 +1022,7 @@ static void DIRequest(ENTITY * e)
/*
* callback function from didd
*/
static void didd_callback(void *context, DESCRIPTOR * adapter, int removal)
static void didd_callback(void *context, DESCRIPTOR *adapter, int removal)
{
if (adapter->type == IDI_DADAPTER) {
DBG_ERR(("Notification about IDI_DADAPTER change ! Oops."));
......@@ -1074,7 +1074,7 @@ static int divacapi_connect_didd(void)
IDI_SYNC_REQ_DIDD_REGISTER_ADAPTER_NOTIFY;
req.didd_notify.info.callback = (void *)didd_callback;
req.didd_notify.info.context = NULL;
DAdapter.request((ENTITY *) & req);
DAdapter.request((ENTITY *)&req);
if (req.didd_notify.e.Rc != 0xff) {
stop_dbg();
return (0);
......@@ -1105,7 +1105,7 @@ static void divacapi_disconnect_didd(void)
req.didd_notify.e.Req = 0;
req.didd_notify.e.Rc = IDI_SYNC_REQ_DIDD_REMOVE_ADAPTER_NOTIFY;
req.didd_notify.info.handle = notify_handle;
DAdapter.request((ENTITY *) & req);
DAdapter.request((ENTITY *)&req);
}
/*
......@@ -1176,7 +1176,7 @@ static void do_api_remove_start(void)
if (ret)
DBG_ERR(("could not remove signaling ID's"))
}
}
/*
* init
......
......@@ -69,7 +69,7 @@ diva_os_message_buffer_s *diva_os_alloc_message_buffer(unsigned long size,
/*
* free a message buffer
*/
void diva_os_free_message_buffer(diva_os_message_buffer_s * dmb)
void diva_os_free_message_buffer(diva_os_message_buffer_s *dmb)
{
kfree_skb(dmb);
}
......
This diff is collapsed.
This diff is collapsed.
......@@ -26,8 +26,8 @@
#ifndef __DIVA_DIDD_DADAPTER_INC__
#define __DIVA_DIDD_DADAPTER_INC__
void diva_didd_load_time_init (void);
void diva_didd_load_time_finit (void);
void diva_didd_load_time_init(void);
void diva_didd_load_time_finit(void);
#define NEW_MAX_DESCRIPTORS 64
......
This diff is collapsed.
......@@ -41,25 +41,25 @@ typedef struct _diva_dbg_entry_head {
dword data_length;
} diva_dbg_entry_head_t;
int diva_maint_init (byte* base, unsigned long length, int do_init);
void* diva_maint_finit (void);
dword diva_dbg_q_length (void);
diva_dbg_entry_head_t* diva_maint_get_message (word* size,
diva_os_spin_lock_magic_t* old_irql);
void diva_maint_ack_message (int do_release,
diva_os_spin_lock_magic_t* old_irql);
void diva_maint_prtComp (char *format, ...);
void diva_maint_wakeup_read (void);
int diva_get_driver_info (dword id, byte* data, int data_length);
int diva_get_driver_dbg_mask (dword id, byte* data);
int diva_set_driver_dbg_mask (dword id, dword mask);
void diva_mnt_remove_xdi_adapter (const DESCRIPTOR* d);
void diva_mnt_add_xdi_adapter (const DESCRIPTOR* d);
int diva_mnt_shutdown_xdi_adapters (void);
int diva_maint_init(byte *base, unsigned long length, int do_init);
void *diva_maint_finit(void);
dword diva_dbg_q_length(void);
diva_dbg_entry_head_t *diva_maint_get_message(word *size,
diva_os_spin_lock_magic_t *old_irql);
void diva_maint_ack_message(int do_release,
diva_os_spin_lock_magic_t *old_irql);
void diva_maint_prtComp(char *format, ...);
void diva_maint_wakeup_read(void);
int diva_get_driver_info(dword id, byte *data, int data_length);
int diva_get_driver_dbg_mask(dword id, byte *data);
int diva_set_driver_dbg_mask(dword id, dword mask);
void diva_mnt_remove_xdi_adapter(const DESCRIPTOR *d);
void diva_mnt_add_xdi_adapter(const DESCRIPTOR *d);
int diva_mnt_shutdown_xdi_adapters(void);
#define DIVA_MAX_SELECTIVE_FILTER_LENGTH 127
int diva_set_trace_filter (int filter_length, const char* filter);
int diva_get_trace_filter (int max_length, char* filter);
int diva_set_trace_filter(int filter_length, const char *filter);
int diva_get_trace_filter(int max_length, char *filter);
#define DITRACE_CMD_GET_DRIVER_INFO 1
......@@ -72,7 +72,7 @@ int diva_get_trace_filter (int max_length, char* filter);
/*
Trace lavels for debug via management interface
*/
*/
#define DIVA_MGT_DBG_TRACE 0x00000001 /* All trace messages from the card */
#define DIVA_MGT_DBG_DCHAN 0x00000002 /* All D-channel relater trace messages */
#define DIVA_MGT_DBG_MDM_PROGRESS 0x00000004 /* Modem progress events */
......@@ -86,5 +86,3 @@ int diva_get_trace_filter (int max_length, char* filter);
#define DIVA_MGT_DBG_IFC_AUDIO 0x00000400 /* Audio Tap trace for all channels */
# endif /* DEBUG_IF___H */
This diff is collapsed.
This diff is collapsed.
......@@ -29,14 +29,14 @@
rest of the world
should be divisible by 4
*/
#define DIVA_DFIFO_RAW_SZ (2512*8)
#define DIVA_DFIFO_RAW_SZ (2512 * 8)
#define DIVA_DFIFO_DATA_SZ 68
#define DIVA_DFIFO_HDR_SZ 4
#define DIVA_DFIFO_SEGMENT_SZ (DIVA_DFIFO_DATA_SZ+DIVA_DFIFO_HDR_SZ)
#define DIVA_DFIFO_SEGMENTS ((DIVA_DFIFO_RAW_SZ)/(DIVA_DFIFO_SEGMENT_SZ)+1)
#define DIVA_DFIFO_MEM_SZ (\
(DIVA_DFIFO_SEGMENT_SZ)*(DIVA_DFIFO_SEGMENTS)+\
(DIVA_DFIFO_CACHE_SZ)*2\
#define DIVA_DFIFO_SEGMENT_SZ (DIVA_DFIFO_DATA_SZ + DIVA_DFIFO_HDR_SZ)
#define DIVA_DFIFO_SEGMENTS ((DIVA_DFIFO_RAW_SZ) / (DIVA_DFIFO_SEGMENT_SZ) + 1)
#define DIVA_DFIFO_MEM_SZ ( \
(DIVA_DFIFO_SEGMENT_SZ) * (DIVA_DFIFO_SEGMENTS) + \
(DIVA_DFIFO_CACHE_SZ) * 2 \
)
#define DIVA_DFIFO_STEP DIVA_DFIFO_SEGMENT_SZ
/* -------------------------------------------------------------------------
......@@ -50,5 +50,5 @@
#define DIVA_DFIFO_READY 0x40 /* This block is ready for processing */
#define DIVA_DFIFO_LAST 0x20 /* This block is last in message */
#define DIVA_DFIFO_AUTO 0x10 /* Don't look for 'ready', don't ack */
int diva_dfifo_create (void* start, int length);
int diva_dfifo_create(void *start, int length);
#endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment