diff options
author | Joe Perches <joe@perches.com> | 2012-02-19 19:52:38 -0800 |
---|---|---|
committer | Joe Perches <joe@perches.com> | 2012-02-21 09:04:01 -0800 |
commit | 475be4d85a274d0961593db41cf85689db1d583c (patch) | |
tree | b2b8931eb747794730522c3cf1898e46948527b9 /drivers/isdn/gigaset | |
parent | 0b0a635f79f91f3755b6518627ea06dd0dbfd523 (diff) |
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: Joe Perches <joe@perches.com>
Diffstat (limited to 'drivers/isdn/gigaset')
-rw-r--r-- | drivers/isdn/gigaset/asyncdata.c | 4 | ||||
-rw-r--r-- | drivers/isdn/gigaset/bas-gigaset.c | 42 | ||||
-rw-r--r-- | drivers/isdn/gigaset/capi.c | 228 | ||||
-rw-r--r-- | drivers/isdn/gigaset/common.c | 14 | ||||
-rw-r--r-- | drivers/isdn/gigaset/ev-layer.c | 328 | ||||
-rw-r--r-- | drivers/isdn/gigaset/gigaset.h | 30 | ||||
-rw-r--r-- | drivers/isdn/gigaset/i4l.c | 8 | ||||
-rw-r--r-- | drivers/isdn/gigaset/interface.c | 20 | ||||
-rw-r--r-- | drivers/isdn/gigaset/isocdata.c | 192 | ||||
-rw-r--r-- | drivers/isdn/gigaset/proc.c | 4 | ||||
-rw-r--r-- | drivers/isdn/gigaset/ser-gigaset.c | 6 | ||||
-rw-r--r-- | drivers/isdn/gigaset/usb-gigaset.c | 8 |
12 files changed, 442 insertions, 442 deletions
diff --git a/drivers/isdn/gigaset/asyncdata.c b/drivers/isdn/gigaset/asyncdata.c index fddae72e3f9..c90dca5abea 100644 --- a/drivers/isdn/gigaset/asyncdata.c +++ b/drivers/isdn/gigaset/asyncdata.c @@ -214,7 +214,7 @@ byte_stuff: } else if (fcs != PPP_GOODFCS) { /* frame check error */ dev_err(cs->dev, - "Checksum failed, %u bytes corrupted!\n", + "Checksum failed, %u bytes corrupted!\n", skb->len); gigaset_isdn_rcv_err(bcs); dev_kfree_skb_any(skb); @@ -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; diff --git a/drivers/isdn/gigaset/bas-gigaset.c b/drivers/isdn/gigaset/bas-gigaset.c index 3913f47ef86..afa080258bf 100644 --- a/drivers/isdn/gigaset/bas-gigaset.c +++ b/drivers/isdn/gigaset/bas-gigaset.c @@ -410,10 +410,10 @@ static void check_pending(struct bas_cardstate *ucs) if (!(ucs->basstate & BS_RESETTING)) ucs->pending = 0; break; - /* - * HD_READ_ATMESSAGE and HD_WRITE_ATMESSAGE are handled separately - * and should never end up here - */ + /* + * HD_READ_ATMESSAGE and HD_WRITE_ATMESSAGE are handled separately + * and should never end up here + */ default: dev_warn(&ucs->interface->dev, "unknown pending request 0x%02x cleared\n", @@ -491,7 +491,7 @@ static void read_ctrl_callback(struct urb *urb) numbytes = urb->actual_length; if (unlikely(numbytes != ucs->rcvbuf_size)) { dev_warn(cs->dev, - "control read: received %d chars, expected %d\n", + "control read: received %d chars, expected %d\n", numbytes, ucs->rcvbuf_size); if (numbytes > ucs->rcvbuf_size) numbytes = ucs->rcvbuf_size; @@ -710,7 +710,7 @@ static void read_int_callback(struct urb *urb) } l = (unsigned) ucs->int_in_buf[1] + - (((unsigned) ucs->int_in_buf[2]) << 8); + (((unsigned) ucs->int_in_buf[2]) << 8); gig_dbg(DEBUG_USBREQ, "<-------%d: 0x%02x (%u [0x%02x 0x%02x])", urb->actual_length, (int)ucs->int_in_buf[0], l, @@ -770,14 +770,14 @@ static void read_int_callback(struct urb *urb) case HD_RECEIVEATDATA_ACK: /* AT response ready to be received */ if (!l) { dev_warn(cs->dev, - "HD_RECEIVEATDATA_ACK with length 0 ignored\n"); + "HD_RECEIVEATDATA_ACK with length 0 ignored\n"); break; } spin_lock_irqsave(&cs->lock, flags); if (ucs->basstate & BS_ATRDPEND) { spin_unlock_irqrestore(&cs->lock, flags); dev_warn(cs->dev, - "HD_RECEIVEATDATA_ACK(%d) during HD_READ_ATMESSAGE(%d) ignored\n", + "HD_RECEIVEATDATA_ACK(%d) during HD_READ_ATMESSAGE(%d) ignored\n", l, ucs->rcvbuf_size); break; } @@ -878,7 +878,7 @@ static void read_iso_callback(struct urb *urb) ubc->isoinlost += urb->iso_frame_desc[i].actual_length; if (unlikely(urb->iso_frame_desc[i].status != 0 && urb->iso_frame_desc[i].status != - -EINPROGRESS)) + -EINPROGRESS)) ubc->loststatus = urb->iso_frame_desc[i].status; urb->iso_frame_desc[i].status = 0; urb->iso_frame_desc[i].actual_length = 0; @@ -891,7 +891,7 @@ static void read_iso_callback(struct urb *urb) rc = usb_submit_urb(urb, GFP_ATOMIC); if (unlikely(rc != 0 && rc != -ENODEV)) { dev_err(bcs->cs->dev, - "could not resubmit isoc read URB: %s\n", + "could not resubmit isoc read URB: %s\n", get_usb_rcmsg(rc)); dump_urb(DEBUG_ISO, "isoc read", urb); error_hangup(bcs); @@ -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; } @@ -1229,7 +1229,7 @@ static void write_iso_tasklet(unsigned long data) if (ifd->status || ifd->actual_length != ifd->length) { dev_warn(cs->dev, - "isoc write: frame %d[%d/%d]: %s\n", + "isoc write: frame %d[%d/%d]: %s\n", i, ifd->actual_length, ifd->length, get_usb_statmsg(ifd->status)); @@ -1316,7 +1316,7 @@ static void read_iso_tasklet(unsigned long data) ubc->isoindone = NULL; if (unlikely(ubc->loststatus != -EINPROGRESS)) { dev_warn(cs->dev, - "isoc read overrun, URB dropped (status: %s, %d bytes)\n", + "isoc read overrun, URB dropped (status: %s, %d bytes)\n", get_usb_statmsg(ubc->loststatus), ubc->isoinlost); ubc->loststatus = -EINPROGRESS; @@ -1965,7 +1965,7 @@ static int gigaset_write_cmd(struct cardstate *cs, struct cmdbuf_t *cb) int rc; gigaset_dbg_buffer(cs->mstate != MS_LOCKED ? - DEBUG_TRANSCMD : DEBUG_LOCKCMD, + DEBUG_TRANSCMD : DEBUG_LOCKCMD, "CMD Transmit", cb->len, cb->buf); /* translate "+++" escape sequence sent as a single separate command @@ -2453,13 +2453,13 @@ 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); + !(ucs->basstate & + (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 */ } diff --git a/drivers/isdn/gigaset/capi.c b/drivers/isdn/gigaset/capi.c index 6d5ceeece9f..343b5c80cb7 100644 --- a/drivers/isdn/gigaset/capi.c +++ b/drivers/isdn/gigaset/capi.c @@ -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) */ @@ -109,50 +109,50 @@ static struct { u8 *hlc; } cip2bchlc[] = { [1] = { "8090A3", NULL }, - /* Speech (A-law) */ + /* Speech (A-law) */ [2] = { "8890", NULL }, - /* Unrestricted digital information */ + /* Unrestricted digital information */ [3] = { "8990", NULL }, - /* Restricted digital information */ + /* Restricted digital information */ [4] = { "9090A3", NULL }, - /* 3,1 kHz audio (A-law) */ + /* 3,1 kHz audio (A-law) */ [5] = { "9190", NULL }, - /* 7 kHz audio */ + /* 7 kHz audio */ [6] = { "9890", NULL }, - /* Video */ + /* Video */ [7] = { "88C0C6E6", NULL }, - /* Packet mode */ + /* Packet mode */ [8] = { "8890218F", NULL }, - /* 56 kbit/s rate adaptation */ + /* 56 kbit/s rate adaptation */ [9] = { "9190A5", NULL }, - /* Unrestricted digital information with tones/announcements */ + /* Unrestricted digital information with tones/announcements */ [16] = { "8090A3", "9181" }, - /* Telephony */ + /* Telephony */ [17] = { "9090A3", "9184" }, - /* Group 2/3 facsimile */ + /* Group 2/3 facsimile */ [18] = { "8890", "91A1" }, - /* Group 4 facsimile Class 1 */ + /* Group 4 facsimile Class 1 */ [19] = { "8890", "91A4" }, - /* Teletex service basic and mixed mode - and Group 4 facsimile service Classes II and III */ + /* Teletex service basic and mixed mode + and Group 4 facsimile service Classes II and III */ [20] = { "8890", "91A8" }, - /* Teletex service basic and processable mode */ + /* Teletex service basic and processable mode */ [21] = { "8890", "91B1" }, - /* Teletex service basic mode */ + /* Teletex service basic mode */ [22] = { "8890", "91B2" }, - /* International interworking for Videotex */ + /* International interworking for Videotex */ [23] = { "8890", "91B5" }, - /* Telex */ + /* Telex */ [24] = { "8890", "91B8" }, - /* Message Handling Systems in accordance with X.400 */ + /* Message Handling Systems in accordance with X.400 */ [25] = { "8890", "91C1" }, - /* OSI application in accordance with X.200 */ + /* OSI application in accordance with X.200 */ [26] = { "9190A5", "9181" }, - /* 7 kHz telephony */ + /* 7 kHz telephony */ [27] = { "9190A5", "916001" }, - /* Video telephony, first connection */ + /* Video telephony, first connection */ [28] = { "8890", "916002" }, - /* Video telephony, second connection */ + /* Video telephony, second connection */ }; /* @@ -164,7 +164,7 @@ static struct { * emit unsupported parameter warning */ static inline void ignore_cstruct_param(struct cardstate *cs, _cstruct param, - char *msgname, char *paramname) + char *msgname, char *paramname) { if (param && *param) dev_warn(cs->dev, "%s: ignoring unsupported parameter: %s\n", @@ -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); @@ -403,8 +403,8 @@ void gigaset_skb_sent(struct bc_state *bcs, struct sk_buff *dskb) send_data_b3_conf(cs, &iif->ctr, ap->id, CAPIMSG_MSGID(req), bcs->channel + 1, CAPIMSG_HANDLE_REQ(req), (flags & ~CAPI_FLAGS_DELIVERY_CONFIRMATION) ? - CapiFlagsNotSupportedByProtocol : - CAPI_NOERROR); + CapiFlagsNotSupportedByProtocol : + CAPI_NOERROR); } EXPORT_SYMBOL_GPL(gigaset_skb_sent); @@ -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]; } @@ -977,7 +977,7 @@ void gigaset_isdn_stop(struct cardstate *cs) * register CAPI application */ static void gigaset_register_appl(struct capi_ctr *ctr, u16 appl, - capi_register_params *rp) + capi_register_params *rp) { struct gigaset_capi_ctr *iif = container_of(ctr, struct gigaset_capi_ctr, ctr); @@ -1181,21 +1181,21 @@ static void do_facility_req(struct gigaset_capi_ctr *iif, } if (CAPIMSG_U32(pparam, 4) != 0) { dev_notice(cs->dev, - "%s: unsupported supplementary service notification mask 0x%x\n", - "FACILITY_REQ", CAPIMSG_U32(pparam, 4)); + "%s: unsupported supplementary service notification mask 0x%x\n", + "FACILITY_REQ", CAPIMSG_U32(pparam, 4)); info = CapiFacilitySpecificFunctionNotSupported; confparam[3] = 2; /* length */ capimsg_setu16(confparam, 4, - CapiSupplementaryServiceNotSupported); + CapiSupplementaryServiceNotSupported); } info = CapiSuccess; confparam[3] = 2; /* length */ capimsg_setu16(confparam, 4, CapiSuccess); break; - /* ToDo: add supported services */ + /* ToDo: add supported services */ default: dev_notice(cs->dev, - "%s: unsupported supplementary service function 0x%04x\n", + "%s: unsupported supplementary service function 0x%04x\n", "FACILITY_REQ", function); info = CapiFacilitySpecificFunctionNotSupported; /* Supplementary Service specific parameter */ @@ -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 */ @@ -1481,7 +1481,7 @@ static void do_connect_req(struct gigaset_capi_ctr *iif, if (cmsg->BProtocol == CAPI_DEFAULT) { bcs->proto2 = L2_HDLC; dev_warn(cs->dev, - "B2 Protocol X.75 SLP unsupported, using Transparent\n"); + "B2 Protocol X.75 SLP unsupported, using Transparent\n"); } else { switch (cmsg->B1protocol) { case 0: @@ -1492,24 +1492,24 @@ static void do_connect_req(struct gigaset_capi_ctr *iif, break; default: dev_warn(cs->dev, - "B1 Protocol %u unsupported, using Transparent\n", + "B1 Protocol %u unsupported, using Transparent\n", cmsg->B1protocol); bcs->proto2 = L2_VOICE; } if (cmsg->B2protocol != 1) dev_warn(cs->dev, - "B2 Protocol %u unsupported, using Transparent\n", + "B2 Protocol %u unsupported, using Transparent\n", cmsg->B2protocol); if (cmsg->B3protocol != 0) dev_warn(cs->dev, - "B3 Protocol %u unsupported, using Transparent\n", + "B3 Protocol %u unsupported, using Transparent\n", cmsg->B3protocol); ignore_cstruct_param(cs, cmsg->B1configuration, - "CONNECT_REQ", "B1 Configuration"); + "CONNECT_REQ", "B1 Configuration"); ignore_cstruct_param(cs, cmsg->B2configuration, - "CONNECT_REQ", "B2 Configuration"); + "CONNECT_REQ", "B2 Configuration"); ignore_cstruct_param(cs, cmsg->B3configuration, - "CONNECT_REQ", "B3 Configuration"); + "CONNECT_REQ", "B3 Configuration"); } commands[AT_PROTO] = kmalloc(9, GFP_KERNEL); if (!commands[AT_PROTO]) @@ -1518,20 +1518,20 @@ static void do_connect_req(struct gigaset_capi_ctr *iif, /* ToDo: check/encode remaining parameters */ ignore_cstruct_param(cs, cmsg->CalledPartySubaddress, - "CONNECT_REQ", "Called pty subaddr"); + "CONNECT_REQ", "Called pty subaddr"); ignore_cstruct_param(cs, cmsg->CallingPartySubaddress, - "CONNECT_REQ", "Calling pty subaddr"); + "CONNECT_REQ", "Calling pty subaddr"); ignore_cstruct_param(cs, cmsg->LLC, - "CONNECT_REQ", "LLC"); + "CONNECT_REQ", "LLC"); if (cmsg->AdditionalInfo != CAPI_DEFAULT) { ignore_cstruct_param(cs, cmsg->BChannelinformation, - "CONNECT_REQ", "B Channel Information"); + "CONNECT_REQ", "B Channel Information"); ignore_cstruct_param(cs, cmsg->Keypadfacility, - "CONNECT_REQ", "Keypad Facility"); + "CONNECT_REQ", "Keypad Facility"); ignore_cstruct_param(cs, cmsg->Useruserdata, - "CONNECT_REQ", "User-User Data"); + "CONNECT_REQ", "User-User Data"); ignore_cstruct_param(cs, cmsg->Facilitydataarray, - "CONNECT_REQ", "Facility Data Array"); + "CONNECT_REQ", "Facility Data Array"); } /* encode parameter: B channel to use */ @@ -1602,7 +1602,7 @@ static void do_connect_resp(struct gigaset_capi_ctr *iif, if (oap != ap) { spin_unlock_irqrestore(&bcs->aplock, flags); send_disconnect_ind(bcs, oap, - CapiCallGivenToOtherApplication); + CapiCallGivenToOtherApplication); spin_lock_irqsave(&bcs->aplock, flags); } } @@ -1619,7 +1619,7 @@ static void do_connect_resp(struct gigaset_capi_ctr *iif, if (cmsg->BProtocol == CAPI_DEFAULT) { bcs->proto2 = L2_HDLC; dev_warn(cs->dev, - "B2 Protocol X.75 SLP unsupported, using Transparent\n"); + "B2 Protocol X.75 SLP unsupported, using Transparent\n"); } else { switch (cmsg->B1protocol) { case 0: @@ -1630,46 +1630,46 @@ static void do_connect_resp(struct gigaset_capi_ctr *iif, break; default: dev_warn(cs->dev, - "B1 Protocol %u unsupported, using Transparent\n", + "B1 Protocol %u unsupported, using Transparent\n", cmsg->B1protocol); bcs->proto2 = L2_VOICE; } if (cmsg->B2protocol != 1) dev_warn(cs->dev, - "B2 Protocol %u unsupported, using Transparent\n", + "B2 Protocol %u unsupported, using Transparent\n", cmsg->B2protocol); if (cmsg->B3protocol != 0) dev_warn(cs->dev, - "B3 Protocol %u unsupported, using Transparent\n", + "B3 Protocol %u unsupported, using Transparent\n", cmsg->B3protocol); ignore_cstruct_param(cs, cmsg->B1configuration, - "CONNECT_RESP", "B1 Configuration"); + "CONNECT_RESP", "B1 Configuration"); ignore_cstruct_param(cs, cmsg->B2configuration, - "CONNECT_RESP", "B2 Configuration"); + "CONNECT_RESP", "B2 Configuration"); ignore_cstruct_param(cs, cmsg->B3configuration, - "CONNECT_RESP", "B3 Configuration"); + "CONNECT_RESP", "B3 Configuration"); } /* ToDo: check/encode remaining parameters */ ignore_cstruct_param(cs, cmsg->ConnectedNumber, - "CONNECT_RESP", "Connected Number"); + "CONNECT_RESP", "Connected Number"); ignore_cstruct_param(cs, cmsg->ConnectedSubaddress, - "CONNECT_RESP", "Connected Subaddress"); + "CONNECT_RESP", "Connected Subaddress"); ignore_cstruct_param(cs, cmsg->LLC, - "CONNECT_RESP", "LLC"); + "CONNECT_RESP", "LLC"); if (cmsg->AdditionalInfo != CAPI_DEFAULT) { ignore_cstruct_param(cs, cmsg->BChannelinformation, - "CONNECT_RESP", "BChannel Information"); + "CONNECT_RESP", "BChannel Information"); ignore_cstruct_param(cs, cmsg->Keypadfacility, - "CONNECT_RESP", "Keypad Facility"); + "CONNECT_RESP", "Keypad Facility"); ignore_cstruct_param(cs, cmsg->Useruserdata, - "CONNECT_RESP", "User-User Data"); + "CONNECT_RESP", "User-User Data"); ignore_cstruct_param(cs, cmsg->Facilitydataarray, - "CONNECT_RESP", "Facility Data Array"); + "CONNECT_RESP", "Facility Data Array"); } /* 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); @@ -1712,7 +1712,7 @@ static void do_connect_resp(struct gigaset_capi_ctr *iif, if (oap != ap) { spin_unlock_irqrestore(&bcs->aplock, flags); send_disconnect_ind(bcs, oap, - CapiCallGivenToOtherApplication); + CapiCallGivenToOtherApplication); spin_lock_irqsave(&bcs->aplock, flags); } } @@ -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; @@ -1767,7 +1767,7 @@ static void do_connect_b3_req(struct gigaset_capi_ctr *iif, /* NCPI parameter: not applicable for B3 Transparent */ ignore_cstruct_param(cs, cmsg->NCPI, "CONNECT_B3_REQ", "NCPI"); send_conf(iif, ap, skb, (cmsg->NCPI && cmsg->NCPI[0]) ? - CapiNcpiNotSupportedByProtocol : CapiSuccess); + CapiNcpiNotSupportedByProtocol : CapiSuccess); } /* @@ -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 */ @@ -1905,7 +1905,7 @@ static void do_disconnect_req(struct gigaset_capi_ctr *iif, return; } capi_cmsg2message(b3cmsg, - __skb_put(b3skb, CAPI_DISCONNECT_B3_IND_BASELEN)); + __skb_put(b3skb, CAPI_DISCONNECT_B3_IND_BASELEN)); kfree(b3cmsg); capi_ctr_handle_message(&iif->ctr, ap->id, b3skb); } @@ -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) { @@ -1965,9 +1965,9 @@ static void do_disconnect_b3_req(struct gigaset_capi_ctr *iif, /* NCPI parameter: not applicable for B3 Transparent */ ignore_cstruct_param(cs, cmsg->NCPI, - "DISCONNECT_B3_REQ", "NCPI"); + "DISCONNECT_B3_REQ", "NCPI"); send_conf(iif, ap, skb, (cmsg->NCPI && cmsg->NCPI[0]) ? - CapiNcpiNotSupportedByProtocol : CapiSuccess); + CapiNcpiNotSupportedByProtocol : CapiSuccess); } /* @@ -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); @@ -2040,7 +2040,7 @@ static void do_data_b3_req(struct gigaset_capi_ctr *iif, if (!(flags & CAPI_FLAGS_DELIVERY_CONFIRMATION)) send_data_b3_conf(cs, &iif->ctr, ap->id, msgid, channel, handle, flags ? CapiFlagsNotSupportedByProtocol - : CAPI_NOERROR); + : CAPI_NOERROR); } /* @@ -2258,11 +2258,11 @@ static int gigaset_proc_show(struct seq_file *m, void *v) seq_printf(m, "%-16s %s\n", "name", ctr->name); seq_printf(m, "%-16s %s %s\n", "dev", - dev_driver_string(cs->dev), dev_name(cs->dev)); + dev_driver_string(cs->dev), dev_name(cs->dev)); seq_printf(m, "%-16s %d\n", "id", cs->myid); if (cs->gotfwver) seq_printf(m, "%-16s %d.%d.%d.%d\n", "firmware", - cs->fwver[0], cs->fwver[1], cs->fwver[2], cs->fwver[3]); + cs->fwver[0], cs->fwver[1], cs->fwver[2], cs->fwver[3]); seq_printf(m, "%-16s %d\n", "channels", cs->channels); seq_printf(m, "%-16s %s\n", "onechannel", cs->onechannel ? "yes" : "no"); @@ -2315,13 +2315,13 @@ static int gigaset_proc_show(struct seq_file *m, void *v) for (i = 0; i < cs->channels; i++) { seq_printf(m, "[%d]%-13s %d\n", i, "corrupted", - cs->bcs[i].corrupted); + cs->bcs[i].corrupted); seq_printf(m, "[%d]%-13s %d\n", i, "trans_down", - cs->bcs[i].trans_down); + cs->bcs[i].trans_down); seq_printf(m, "[%d]%-13s %d\n", i, "trans_up", - cs->bcs[i].trans_up); + cs->bcs[i].trans_up); seq_printf(m, "[%d]%-13s %d\n", i, "chstate", - cs->bcs[i].chstate); + cs->bcs[i].chstate); switch (cs->bcs[i].proto2) { case L2_BITSYNC: s = "bitsync"; diff --git a/drivers/isdn/gigaset/common.c b/drivers/isdn/gigaset/common.c index db621db67f6..e55aabf8df8 100644 --- a/drivers/isdn/gigaset/common.c +++ b/drivers/isdn/gigaset/common.c @@ -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; diff --git a/drivers/isdn/gigaset/ev-layer.c b/drivers/isdn/gigaset/ev-layer.c index 6d12623c1db..624a8256a77 100644 --- a/drivers/isdn/gigaset/ev-layer.c +++ b/drivers/isdn/gigaset/ev-layer.c @@ -153,104 +153,104 @@ struct reply_t gigaset_tab_nocid[] = * action, command */ /* initialize device, set cid mode if possible */ -{RSP_INIT, -1, -1, SEQ_INIT, 100, 1, {ACT_TIMEOUT} }, + {RSP_INIT, -1, -1, SEQ_INIT, 100, 1, {ACT_TIMEOUT} }, -{EV_TIMEOUT, 100, 100, -1, 101, 3, {0}, "Z\r"}, -{RSP_OK, 101, 103, -1, 120, 5, {ACT_GETSTRING}, - "+GMR\r"}, + {EV_TIMEOUT, 100, 100, -1, 101, 3, {0}, "Z\r"}, + {RSP_OK, 101, 103, -1, 120, 5, {ACT_GETSTRING}, + "+GMR\r"}, -{EV_TIMEOUT, 101, 101, -1, 102, 5, {0}, "Z\r"}, -{RSP_ERROR, 101, 101, -1, 102, 5, {0}, "Z\r"}, + {EV_TIMEOUT, 101, 101, -1, 102, 5, {0}, "Z\r"}, + {RSP_ERROR, 101, 101, -1, 102, 5, {0}, "Z\r"}, -{EV_TIMEOUT, 102, 102, -1, 108, 5, {ACT_SETDLE1}, - "^SDLE=0\r"}, -{RSP_OK, 108, 108, -1, 104, -1}, -{RSP_ZDLE, 104, 104, 0, 103, 5, {0}, "Z\r"}, -{EV_TIMEOUT, 104, 104, -1, 0, 0, {ACT_FAILINIT} }, -{RSP_ERROR, 108, 108, -1, 0, 0, {ACT_FAILINIT} }, + {EV_TIMEOUT, 102, 102, -1, 108, 5, {ACT_SETDLE1}, + "^SDLE=0\r"}, + {RSP_OK, 108, 108, -1, 104, -1}, + {RSP_ZDLE, 104, 104, 0, 103, 5, {0}, "Z\r"}, + {EV_TIMEOUT, 104, 104, -1, 0, 0, {ACT_FAILINIT} }, + {RSP_ERROR, 108, 108, -1, 0, 0, {ACT_FAILINIT} }, -{EV_TIMEOUT, 108, 108, -1, 105, 2, {ACT_SETDLE0, - ACT_HUPMODEM, - ACT_TIMEOUT} }, -{EV_TIMEOUT, 105, 105, -1, 103, 5, {0}, "Z\r"}, + {EV_TIMEOUT, 108, 108, -1, 105, 2, {ACT_SETDLE0, + ACT_HUPMODEM, + ACT_TIMEOUT} }, + {EV_TIMEOUT, 105, 105, -1, 103, 5, {0}, "Z\r"}, -{RSP_ERROR, 102, 102, -1, 107, 5, {0}, "^GETPRE\r"}, -{RSP_OK, 107, 107, -1, 0, 0, {ACT_CONFIGMODE} }, -{RSP_ERROR, 107, 107, -1, 0, 0, {ACT_FAILINIT} }, -{EV_TIMEOUT, 107, 107, -1, 0, 0, {ACT_FAILINIT} }, + {RSP_ERROR, 102, 102, -1, 107, 5, {0}, "^GETPRE\r"}, + {RSP_OK, 107, 107, -1, 0, 0, {ACT_CONFIGMODE} }, + {RSP_ERROR, 107, 107, -1, 0, 0, {ACT_FAILINIT} }, + {EV_TIMEOUT, 107, 107, -1, 0, 0, {ACT_FAILINIT} }, -{RSP_ERROR, 103, 103, -1, 0, 0, {ACT_FAILINIT} }, -{EV_TIMEOUT, 103, 103, -1, 0, 0, {ACT_FAILINIT} }, + {RSP_ERROR, 103, 103, -1, 0, 0, {ACT_FAILINIT} }, + {EV_TIMEOUT, 103, 103, -1, 0, 0, {ACT_FAILINIT} }, -{RSP_STRING, 120, 120, -1, 121, -1, {ACT_SETVER} }, + {RSP_STRING, 120, 120, -1, 121, -1, {ACT_SETVER} }, -{EV_TIMEOUT, 120, 121, -1, 0, 0, {ACT_FAILVER, - ACT_INIT} }, -{RSP_ERROR, 120, |