Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 995c6ed2 authored by Adrian Bunk's avatar Adrian Bunk Committed by Linus Torvalds
Browse files

[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: default avatarAdrian Bunk <bunk@stusta.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 0933ad9c
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -97,7 +97,7 @@ static UCHAR ct41[] = { 1, BYP, 0x29 }; // RESUME
//static UCHAR ct44[]={ 2, BTH,     0x2C,0                   }; // MS PING
//static UCHAR ct44[]={ 2, BTH,     0x2C,0                   }; // MS PING
//static UCHAR ct45[]={ 1, BTH,     0x2D                     }; // HOTENAB
//static UCHAR ct45[]={ 1, BTH,     0x2D                     }; // HOTENAB
//static UCHAR ct46[]={ 1, BTH,     0x2E                     }; // HOTDSAB
//static UCHAR ct46[]={ 1, BTH,     0x2E                     }; // HOTDSAB
static UCHAR ct47[] = { 7, BTH,     0x2F,0,0,0,0,0,0         }; // UNIX FLAGS
//static UCHAR ct47[]={ 7, BTH,     0x2F,0,0,0,0,0,0         }; // UNIX FLAGS
//static UCHAR ct48[]={ 1, BTH,     0x30                     }; // DSRFLOWENAB
//static UCHAR ct48[]={ 1, BTH,     0x30                     }; // DSRFLOWENAB
//static UCHAR ct49[]={ 1, BTH,     0x31                     }; // DSRFLOWDSAB
//static UCHAR ct49[]={ 1, BTH,     0x31                     }; // DSRFLOWDSAB
//static UCHAR ct50[]={ 1, BTH,     0x32                     }; // DTRFLOWENAB
//static UCHAR ct50[]={ 1, BTH,     0x32                     }; // DTRFLOWENAB
@@ -162,6 +162,7 @@ static UCHAR ct89[]={ 1, BYP, 0x59 }; // DSS_NOW
// This routine sets the parameters of command 47 and returns a pointer to the
// This routine sets the parameters of command 47 and returns a pointer to the
// appropriate structure.
// appropriate structure.
//******************************************************************************
//******************************************************************************
#if 0
cmdSyntaxPtr
cmdSyntaxPtr
i2cmdUnixFlags(unsigned short iflag,unsigned short cflag,unsigned short lflag)
i2cmdUnixFlags(unsigned short iflag,unsigned short cflag,unsigned short lflag)
{
{
@@ -175,6 +176,7 @@ i2cmdUnixFlags(unsigned short iflag,unsigned short cflag,unsigned short lflag)
	pCM->cmd[6] = (unsigned char) (lflag >> 8);
	pCM->cmd[6] = (unsigned char) (lflag >> 8);
	return pCM;
	return pCM;
}
}
#endif  /*  0  */


//******************************************************************************
//******************************************************************************
// Function:   i2cmdBaudDef(which, rate)
// Function:   i2cmdBaudDef(which, rate)
@@ -187,7 +189,7 @@ i2cmdUnixFlags(unsigned short iflag,unsigned short cflag,unsigned short lflag)
// This routine sets the parameters of commands 54 or 55 (according to the
// This routine sets the parameters of commands 54 or 55 (according to the
// argument which), and returns a pointer to the appropriate structure.
// argument which), and returns a pointer to the appropriate structure.
//******************************************************************************
//******************************************************************************
cmdSyntaxPtr
static cmdSyntaxPtr
i2cmdBaudDef(int which, unsigned short rate)
i2cmdBaudDef(int which, unsigned short rate)
{
{
	cmdSyntaxPtr pCM;
	cmdSyntaxPtr pCM;
+2 −10
Original line number Original line Diff line number Diff line
@@ -64,16 +64,6 @@ typedef struct _cmdSyntax
						// directly from user-level
						// directly from user-level
#define VAR 0x10        // This command is of variable length!
#define VAR 0x10        // This command is of variable length!


//-----------------------------------
// External declarations for i2cmd.c
//-----------------------------------
// Routine to set up parameters for the "define hot-key sequence" command. Since
// there is more than one parameter to assign, we must use a function rather
// than a macro (used usually).
//
extern cmdSyntaxPtr i2cmdUnixFlags(USHORT iflag,USHORT cflag,USHORT lflag);
extern cmdSyntaxPtr i2cmdBaudDef(int which, USHORT rate);

// Declarations for the global arrays used to bear the commands and their
// Declarations for the global arrays used to bear the commands and their
// arguments.
// arguments.
//
//
@@ -433,6 +423,7 @@ static UCHAR cc02[];
#define CMD_HOT_ENAB (cmdSyntaxPtr)(ct45) // Enable Hot-key checking
#define CMD_HOT_ENAB (cmdSyntaxPtr)(ct45) // Enable Hot-key checking
#define CMD_HOT_DSAB (cmdSyntaxPtr)(ct46) // Disable Hot-key checking
#define CMD_HOT_DSAB (cmdSyntaxPtr)(ct46) // Disable Hot-key checking


#if 0
// COMMAND 47: Send Protocol info via Unix flags:
// COMMAND 47: Send Protocol info via Unix flags:
// iflag = Unix tty t_iflag
// iflag = Unix tty t_iflag
// cflag = Unix tty t_cflag
// cflag = Unix tty t_cflag
@@ -441,6 +432,7 @@ static UCHAR cc02[];
// within these flags
// within these flags
//
//
#define CMD_UNIX_FLAGS(iflag,cflag,lflag) i2cmdUnixFlags(iflag,cflag,lflag)
#define CMD_UNIX_FLAGS(iflag,cflag,lflag) i2cmdUnixFlags(iflag,cflag,lflag)
#endif  /*  0  */


#define CMD_DSRFL_ENAB  (cmdSyntaxPtr)(ct48) // Enable  DSR receiver ctrl
#define CMD_DSRFL_ENAB  (cmdSyntaxPtr)(ct48) // Enable  DSR receiver ctrl
#define CMD_DSRFL_DSAB  (cmdSyntaxPtr)(ct49) // Disable DSR receiver ctrl
#define CMD_DSRFL_DSAB  (cmdSyntaxPtr)(ct49) // Disable DSR receiver ctrl
+0 −10
Original line number Original line Diff line number Diff line
@@ -2691,16 +2691,6 @@ no_xon:
		pCh->flags	|= ASYNC_CHECK_CD;
		pCh->flags	|= ASYNC_CHECK_CD;
	}
	}


#ifdef XXX
do_flags_thing:	// This is a test, we don't do the flags thing
	
	if ( (cflag & CRTSCTS) ) {
		cflag |= 014000000000;
	}
	i2QueueCommands(PTYPE_BYPASS, pCh, 100, 1, 
				CMD_UNIX_FLAGS(iflag,cflag,lflag));
#endif
		
service_it:
service_it:
	i2DrainOutput( pCh, 100 );		
	i2DrainOutput( pCh, 100 );		
}
}