aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2005-06-25 17:59:16 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-25 19:25:06 -0400
commit995c6ed2b1bb309eb45c3006779dc90fb3f4150d (patch)
tree8f49632617f400dcba40e55d9d92a291c0743a87
parent0933ad9c233b09ee5fd636525ed07c149c879980 (diff)
[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>
-rw-r--r--drivers/char/ip2/i2cmd.c6
-rw-r--r--drivers/char/ip2/i2cmd.h12
-rw-r--r--drivers/char/ip2main.c10
3 files changed, 6 insertions, 22 deletions
diff --git a/drivers/char/ip2/i2cmd.c b/drivers/char/ip2/i2cmd.c
index fd299d6c42ac..cb8f4198e9a3 100644
--- a/drivers/char/ip2/i2cmd.c
+++ b/drivers/char/ip2/i2cmd.c
@@ -97,7 +97,7 @@ static UCHAR ct41[] = { 1, BYP, 0x29 }; // RESUME
97//static UCHAR ct44[]={ 2, BTH, 0x2C,0 }; // MS PING 97//static UCHAR ct44[]={ 2, BTH, 0x2C,0 }; // MS PING
98//static UCHAR ct45[]={ 1, BTH, 0x2D }; // HOTENAB 98//static UCHAR ct45[]={ 1, BTH, 0x2D }; // HOTENAB
99//static UCHAR ct46[]={ 1, BTH, 0x2E }; // HOTDSAB 99//static UCHAR ct46[]={ 1, BTH, 0x2E }; // HOTDSAB
100static UCHAR ct47[] = { 7, BTH, 0x2F,0,0,0,0,0,0 }; // UNIX FLAGS 100//static UCHAR ct47[]={ 7, BTH, 0x2F,0,0,0,0,0,0 }; // UNIX FLAGS
101//static UCHAR ct48[]={ 1, BTH, 0x30 }; // DSRFLOWENAB 101//static UCHAR ct48[]={ 1, BTH, 0x30 }; // DSRFLOWENAB
102//static UCHAR ct49[]={ 1, BTH, 0x31 }; // DSRFLOWDSAB 102//static UCHAR ct49[]={ 1, BTH, 0x31 }; // DSRFLOWDSAB
103//static UCHAR ct50[]={ 1, BTH, 0x32 }; // DTRFLOWENAB 103//static UCHAR ct50[]={ 1, BTH, 0x32 }; // DTRFLOWENAB
@@ -162,6 +162,7 @@ static UCHAR ct89[]={ 1, BYP, 0x59 }; // DSS_NOW
162// This routine sets the parameters of command 47 and returns a pointer to the 162// This routine sets the parameters of command 47 and returns a pointer to the
163// appropriate structure. 163// appropriate structure.
164//****************************************************************************** 164//******************************************************************************
165#if 0
165cmdSyntaxPtr 166cmdSyntaxPtr
166i2cmdUnixFlags(unsigned short iflag,unsigned short cflag,unsigned short lflag) 167i2cmdUnixFlags(unsigned short iflag,unsigned short cflag,unsigned short lflag)
167{ 168{
@@ -175,6 +176,7 @@ i2cmdUnixFlags(unsigned short iflag,unsigned short cflag,unsigned short lflag)
175 pCM->cmd[6] = (unsigned char) (lflag >> 8); 176 pCM->cmd[6] = (unsigned char) (lflag >> 8);
176 return pCM; 177 return pCM;
177} 178}
179#endif /* 0 */
178 180
179//****************************************************************************** 181//******************************************************************************
180// Function: i2cmdBaudDef(which, rate) 182// Function: i2cmdBaudDef(which, rate)
@@ -187,7 +189,7 @@ i2cmdUnixFlags(unsigned short iflag,unsigned short cflag,unsigned short lflag)
187// This routine sets the parameters of commands 54 or 55 (according to the 189// This routine sets the parameters of commands 54 or 55 (according to the
188// argument which), and returns a pointer to the appropriate structure. 190// argument which), and returns a pointer to the appropriate structure.
189//****************************************************************************** 191//******************************************************************************
190cmdSyntaxPtr 192static cmdSyntaxPtr
191i2cmdBaudDef(int which, unsigned short rate) 193i2cmdBaudDef(int which, unsigned short rate)
192{ 194{
193 cmdSyntaxPtr pCM; 195 cmdSyntaxPtr pCM;
diff --git a/drivers/char/ip2/i2cmd.h b/drivers/char/ip2/i2cmd.h
index c41728a85710..baa4e721b758 100644
--- a/drivers/char/ip2/i2cmd.h
+++ b/drivers/char/ip2/i2cmd.h
@@ -64,16 +64,6 @@ typedef struct _cmdSyntax
64 // directly from user-level 64 // directly from user-level
65#define VAR 0x10 // This command is of variable length! 65#define VAR 0x10 // This command is of variable length!
66 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//
74extern cmdSyntaxPtr i2cmdUnixFlags(USHORT iflag,USHORT cflag,USHORT lflag);
75extern cmdSyntaxPtr i2cmdBaudDef(int which, USHORT rate);
76
77// Declarations for the global arrays used to bear the commands and their 67// Declarations for the global arrays used to bear the commands and their
78// arguments. 68// arguments.
79// 69//
@@ -433,6 +423,7 @@ static UCHAR cc02[];
433#define CMD_HOT_ENAB (cmdSyntaxPtr)(ct45) // Enable Hot-key checking 423#define CMD_HOT_ENAB (cmdSyntaxPtr)(ct45) // Enable Hot-key checking
434#define CMD_HOT_DSAB (cmdSyntaxPtr)(ct46) // Disable Hot-key checking 424#define CMD_HOT_DSAB (cmdSyntaxPtr)(ct46) // Disable Hot-key checking
435 425
426#if 0
436// COMMAND 47: Send Protocol info via Unix flags: 427// COMMAND 47: Send Protocol info via Unix flags:
437// iflag = Unix tty t_iflag 428// iflag = Unix tty t_iflag
438// cflag = Unix tty t_cflag 429// cflag = Unix tty t_cflag
@@ -441,6 +432,7 @@ static UCHAR cc02[];
441// within these flags 432// within these flags
442// 433//
443#define CMD_UNIX_FLAGS(iflag,cflag,lflag) i2cmdUnixFlags(iflag,cflag,lflag) 434#define CMD_UNIX_FLAGS(iflag,cflag,lflag) i2cmdUnixFlags(iflag,cflag,lflag)
435#endif /* 0 */
444 436
445#define CMD_DSRFL_ENAB (cmdSyntaxPtr)(ct48) // Enable DSR receiver ctrl 437#define CMD_DSRFL_ENAB (cmdSyntaxPtr)(ct48) // Enable DSR receiver ctrl
446#define CMD_DSRFL_DSAB (cmdSyntaxPtr)(ct49) // Disable DSR receiver ctrl 438#define CMD_DSRFL_DSAB (cmdSyntaxPtr)(ct49) // Disable DSR receiver ctrl
diff --git a/drivers/char/ip2main.c b/drivers/char/ip2main.c
index 3b8314b4249a..cf0cd58d6305 100644
--- a/drivers/char/ip2main.c
+++ b/drivers/char/ip2main.c
@@ -2691,16 +2691,6 @@ no_xon:
2691 pCh->flags |= ASYNC_CHECK_CD; 2691 pCh->flags |= ASYNC_CHECK_CD;
2692 } 2692 }
2693 2693
2694#ifdef XXX
2695do_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
2704service_it: 2694service_it:
2705 i2DrainOutput( pCh, 100 ); 2695 i2DrainOutput( pCh, 100 );
2706} 2696}