aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/gigaset/asyncdata.c
diff options
context:
space:
mode:
authorTilman Schmidt <tilman@imap.cc>2008-12-26 04:22:03 -0500
committerDavid S. Miller <davem@davemloft.net>2008-12-26 04:22:03 -0500
commit236b87c29953a87a6817e96e311b0efd00e95dc7 (patch)
treea2715c6cec5fd21f410f1428eaf4dbc7ba7056d2 /drivers/isdn/gigaset/asyncdata.c
parentc8770dcabd6a615b155c25dc4d57251d3e7f151c (diff)
gigaset: ifdef cleanup
Remove unnecessary #ifdef-s and #if-0-ed code sections. Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn/gigaset/asyncdata.c')
-rw-r--r--drivers/isdn/gigaset/asyncdata.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/drivers/isdn/gigaset/asyncdata.c b/drivers/isdn/gigaset/asyncdata.c
index c2bd97d29273..2a4ce96f04bd 100644
--- a/drivers/isdn/gigaset/asyncdata.c
+++ b/drivers/isdn/gigaset/asyncdata.c
@@ -17,8 +17,6 @@
17#include <linux/crc-ccitt.h> 17#include <linux/crc-ccitt.h>
18#include <linux/bitrev.h> 18#include <linux/bitrev.h>
19 19
20//#define GIG_M10x_STUFF_VOICE_DATA
21
22/* check if byte must be stuffed/escaped 20/* check if byte must be stuffed/escaped
23 * I'm not sure which data should be encoded. 21 * I'm not sure which data should be encoded.
24 * Therefore I will go the hard way and decode every value 22 * Therefore I will go the hard way and decode every value
@@ -147,19 +145,17 @@ static inline int hdlc_loop(unsigned char c, unsigned char *src, int numbytes,
147 } 145 }
148byte_stuff: 146byte_stuff:
149 c ^= PPP_TRANS; 147 c ^= PPP_TRANS;
150#ifdef CONFIG_GIGASET_DEBUG
151 if (unlikely(!muststuff(c))) 148 if (unlikely(!muststuff(c)))
152 gig_dbg(DEBUG_HDLC, "byte stuffed: 0x%02x", c); 149 gig_dbg(DEBUG_HDLC, "byte stuffed: 0x%02x", c);
153#endif
154 } else if (unlikely(c == PPP_FLAG)) { 150 } else if (unlikely(c == PPP_FLAG)) {
155 if (unlikely(inputstate & INS_skip_frame)) { 151 if (unlikely(inputstate & INS_skip_frame)) {
156 if (!(inputstate & INS_have_data)) { /* 7E 7E */
157#ifdef CONFIG_GIGASET_DEBUG 152#ifdef CONFIG_GIGASET_DEBUG
153 if (!(inputstate & INS_have_data)) { /* 7E 7E */
158 ++bcs->emptycount; 154 ++bcs->emptycount;
159#endif
160 } else 155 } else
161 gig_dbg(DEBUG_HDLC, 156 gig_dbg(DEBUG_HDLC,
162 "7e----------------------------"); 157 "7e----------------------------");
158#endif
163 159
164 /* end of frame */ 160 /* end of frame */
165 error = 1; 161 error = 1;
@@ -226,11 +222,9 @@ byte_stuff:
226 } 222 }
227 223
228 break; 224 break;
229#ifdef CONFIG_GIGASET_DEBUG
230 } else if (unlikely(muststuff(c))) { 225 } else if (unlikely(muststuff(c))) {
231 /* Should not happen. Possible after ZDLE=1<CR><LF>. */ 226 /* Should not happen. Possible after ZDLE=1<CR><LF>. */
232 gig_dbg(DEBUG_HDLC, "not byte stuffed: 0x%02x", c); 227 gig_dbg(DEBUG_HDLC, "not byte stuffed: 0x%02x", c);
233#endif
234 } 228 }
235 229
236 /* add character */ 230 /* add character */
@@ -394,20 +388,16 @@ void gigaset_m10x_input(struct inbuf_t *inbuf)
394 inbuf->inputstate &= ~INS_DLE_char; 388 inbuf->inputstate &= ~INS_DLE_char;
395 switch (c) { 389 switch (c) {
396 case 'X': /*begin of command*/ 390 case 'X': /*begin of command*/
397#ifdef CONFIG_GIGASET_DEBUG
398 if (inbuf->inputstate & INS_command) 391 if (inbuf->inputstate & INS_command)
399 dev_err(cs->dev, 392 dev_warn(cs->dev,
400 "received <DLE> 'X' in command mode\n"); 393 "received <DLE> 'X' in command mode\n");
401#endif
402 inbuf->inputstate |= 394 inbuf->inputstate |=
403 INS_command | INS_DLE_command; 395 INS_command | INS_DLE_command;
404 break; 396 break;
405 case '.': /*end of command*/ 397 case '.': /*end of command*/
406#ifdef CONFIG_GIGASET_DEBUG
407 if (!(inbuf->inputstate & INS_command)) 398 if (!(inbuf->inputstate & INS_command))
408 dev_err(cs->dev, 399 dev_warn(cs->dev,
409 "received <DLE> '.' in hdlc mode\n"); 400 "received <DLE> '.' in hdlc mode\n");
410#endif
411 inbuf->inputstate &= cs->dle ? 401 inbuf->inputstate &= cs->dle ?
412 ~(INS_DLE_command|INS_command) 402 ~(INS_DLE_command|INS_command)
413 : ~INS_DLE_command; 403 : ~INS_DLE_command;