]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/isdn/gigaset/asyncdata.c
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux...
[linux-2.6-omap-h63xx.git] / drivers / isdn / gigaset / asyncdata.c
index c2bd97d29273ce584b5182578d05d41fd995c3da..2a4ce96f04bd7ecfea5ce9111b231e076bc80a28 100644 (file)
@@ -17,8 +17,6 @@
 #include <linux/crc-ccitt.h>
 #include <linux/bitrev.h>
 
-//#define GIG_M10x_STUFF_VOICE_DATA
-
 /* check if byte must be stuffed/escaped
  * I'm not sure which data should be encoded.
  * 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,
                        }
 byte_stuff:
                        c ^= PPP_TRANS;
-#ifdef CONFIG_GIGASET_DEBUG
                        if (unlikely(!muststuff(c)))
                                gig_dbg(DEBUG_HDLC, "byte stuffed: 0x%02x", c);
-#endif
                } else if (unlikely(c == PPP_FLAG)) {
                        if (unlikely(inputstate & INS_skip_frame)) {
-                               if (!(inputstate & INS_have_data)) { /* 7E 7E */
 #ifdef CONFIG_GIGASET_DEBUG
+                               if (!(inputstate & INS_have_data)) { /* 7E 7E */
                                        ++bcs->emptycount;
-#endif
                                } else
                                        gig_dbg(DEBUG_HDLC,
                                            "7e----------------------------");
+#endif
 
                                /* end of frame */
                                error = 1;
@@ -226,11 +222,9 @@ byte_stuff:
                        }
 
                        break;
-#ifdef CONFIG_GIGASET_DEBUG
                } else if (unlikely(muststuff(c))) {
                        /* Should not happen. Possible after ZDLE=1<CR><LF>. */
                        gig_dbg(DEBUG_HDLC, "not byte stuffed: 0x%02x", c);
-#endif
                }
 
                /* add character */
@@ -394,20 +388,16 @@ void gigaset_m10x_input(struct inbuf_t *inbuf)
                                        inbuf->inputstate &= ~INS_DLE_char;
                                        switch (c) {
                                        case 'X': /*begin of command*/
-#ifdef CONFIG_GIGASET_DEBUG
                                                if (inbuf->inputstate & INS_command)
-                                                       dev_err(cs->dev,
+                                                       dev_warn(cs->dev,
                                        "received <DLE> 'X' in command mode\n");
-#endif
                                                inbuf->inputstate |=
                                                        INS_command | INS_DLE_command;
                                                break;
                                        case '.': /*end of command*/
-#ifdef CONFIG_GIGASET_DEBUG
                                                if (!(inbuf->inputstate & INS_command))
-                                                       dev_err(cs->dev,
+                                                       dev_warn(cs->dev,
                                        "received <DLE> '.' in hdlc mode\n");
-#endif
                                                inbuf->inputstate &= cs->dle ?
                                                        ~(INS_DLE_command|INS_command)
                                                        : ~INS_DLE_command;