[PATCH] drivers/char/ip2*: cleanups

This patch contains the following cleanups:
- i2cmd.c: #if 0 the unused function i2cmdUnixFlags
- i2cmd.c: make the needlessly global funciton i2cmdBaudDef static
- ip2main.c: remove dead code that wasn't reachable due to an #ifdef

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by Adrian Bunk and committed by Linus Torvalds 995c6ed2 0933ad9c

+6 -22
+4 -2
drivers/char/ip2/i2cmd.c
··· 97 //static UCHAR ct44[]={ 2, BTH, 0x2C,0 }; // MS PING 98 //static UCHAR ct45[]={ 1, BTH, 0x2D }; // HOTENAB 99 //static UCHAR ct46[]={ 1, BTH, 0x2E }; // HOTDSAB 100 - static UCHAR ct47[] = { 7, BTH, 0x2F,0,0,0,0,0,0 }; // UNIX FLAGS 101 //static UCHAR ct48[]={ 1, BTH, 0x30 }; // DSRFLOWENAB 102 //static UCHAR ct49[]={ 1, BTH, 0x31 }; // DSRFLOWDSAB 103 //static UCHAR ct50[]={ 1, BTH, 0x32 }; // DTRFLOWENAB ··· 162 // This routine sets the parameters of command 47 and returns a pointer to the 163 // appropriate structure. 164 //****************************************************************************** 165 cmdSyntaxPtr 166 i2cmdUnixFlags(unsigned short iflag,unsigned short cflag,unsigned short lflag) 167 { ··· 176 pCM->cmd[6] = (unsigned char) (lflag >> 8); 177 return pCM; 178 } 179 180 //****************************************************************************** 181 // Function: i2cmdBaudDef(which, rate) ··· 189 // This routine sets the parameters of commands 54 or 55 (according to the 190 // argument which), and returns a pointer to the appropriate structure. 191 //****************************************************************************** 192 - cmdSyntaxPtr 193 i2cmdBaudDef(int which, unsigned short rate) 194 { 195 cmdSyntaxPtr pCM;
··· 97 //static UCHAR ct44[]={ 2, BTH, 0x2C,0 }; // MS PING 98 //static UCHAR ct45[]={ 1, BTH, 0x2D }; // HOTENAB 99 //static UCHAR ct46[]={ 1, BTH, 0x2E }; // HOTDSAB 100 + //static UCHAR ct47[]={ 7, BTH, 0x2F,0,0,0,0,0,0 }; // UNIX FLAGS 101 //static UCHAR ct48[]={ 1, BTH, 0x30 }; // DSRFLOWENAB 102 //static UCHAR ct49[]={ 1, BTH, 0x31 }; // DSRFLOWDSAB 103 //static UCHAR ct50[]={ 1, BTH, 0x32 }; // DTRFLOWENAB ··· 162 // This routine sets the parameters of command 47 and returns a pointer to the 163 // appropriate structure. 164 //****************************************************************************** 165 + #if 0 166 cmdSyntaxPtr 167 i2cmdUnixFlags(unsigned short iflag,unsigned short cflag,unsigned short lflag) 168 { ··· 175 pCM->cmd[6] = (unsigned char) (lflag >> 8); 176 return pCM; 177 } 178 + #endif /* 0 */ 179 180 //****************************************************************************** 181 // Function: i2cmdBaudDef(which, rate) ··· 187 // This routine sets the parameters of commands 54 or 55 (according to the 188 // argument which), and returns a pointer to the appropriate structure. 189 //****************************************************************************** 190 + static cmdSyntaxPtr 191 i2cmdBaudDef(int which, unsigned short rate) 192 { 193 cmdSyntaxPtr pCM;
+2 -10
drivers/char/ip2/i2cmd.h
··· 64 // directly from user-level 65 #define VAR 0x10 // This command is of variable length! 66 67 - //----------------------------------- 68 - // External declarations for i2cmd.c 69 - //----------------------------------- 70 - // Routine to set up parameters for the "define hot-key sequence" command. Since 71 - // there is more than one parameter to assign, we must use a function rather 72 - // than a macro (used usually). 73 - // 74 - extern cmdSyntaxPtr i2cmdUnixFlags(USHORT iflag,USHORT cflag,USHORT lflag); 75 - extern cmdSyntaxPtr i2cmdBaudDef(int which, USHORT rate); 76 - 77 // Declarations for the global arrays used to bear the commands and their 78 // arguments. 79 // ··· 423 #define CMD_HOT_ENAB (cmdSyntaxPtr)(ct45) // Enable Hot-key checking 424 #define CMD_HOT_DSAB (cmdSyntaxPtr)(ct46) // Disable Hot-key checking 425 426 // COMMAND 47: Send Protocol info via Unix flags: 427 // iflag = Unix tty t_iflag 428 // cflag = Unix tty t_cflag ··· 432 // within these flags 433 // 434 #define CMD_UNIX_FLAGS(iflag,cflag,lflag) i2cmdUnixFlags(iflag,cflag,lflag) 435 436 #define CMD_DSRFL_ENAB (cmdSyntaxPtr)(ct48) // Enable DSR receiver ctrl 437 #define CMD_DSRFL_DSAB (cmdSyntaxPtr)(ct49) // Disable DSR receiver ctrl
··· 64 // directly from user-level 65 #define VAR 0x10 // This command is of variable length! 66 67 // Declarations for the global arrays used to bear the commands and their 68 // arguments. 69 // ··· 433 #define CMD_HOT_ENAB (cmdSyntaxPtr)(ct45) // Enable Hot-key checking 434 #define CMD_HOT_DSAB (cmdSyntaxPtr)(ct46) // Disable Hot-key checking 435 436 + #if 0 437 // COMMAND 47: Send Protocol info via Unix flags: 438 // iflag = Unix tty t_iflag 439 // cflag = Unix tty t_cflag ··· 441 // within these flags 442 // 443 #define CMD_UNIX_FLAGS(iflag,cflag,lflag) i2cmdUnixFlags(iflag,cflag,lflag) 444 + #endif /* 0 */ 445 446 #define CMD_DSRFL_ENAB (cmdSyntaxPtr)(ct48) // Enable DSR receiver ctrl 447 #define CMD_DSRFL_DSAB (cmdSyntaxPtr)(ct49) // Disable DSR receiver ctrl
-10
drivers/char/ip2main.c
··· 2691 pCh->flags |= ASYNC_CHECK_CD; 2692 } 2693 2694 - #ifdef XXX 2695 - do_flags_thing: // This is a test, we don't do the flags thing 2696 - 2697 - if ( (cflag & CRTSCTS) ) { 2698 - cflag |= 014000000000; 2699 - } 2700 - i2QueueCommands(PTYPE_BYPASS, pCh, 100, 1, 2701 - CMD_UNIX_FLAGS(iflag,cflag,lflag)); 2702 - #endif 2703 - 2704 service_it: 2705 i2DrainOutput( pCh, 100 ); 2706 }
··· 2691 pCh->flags |= ASYNC_CHECK_CD; 2692 } 2693 2694 service_it: 2695 i2DrainOutput( pCh, 100 ); 2696 }