Skip to contentSkip to conversation

drivers/char/ip2*: misc cleanups (fwd)

PATCH New Adrian Bunk 1 participant 1 message Dec 22, 2004 Char and misc drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/char/ip2*: misc cleanups (fwd)

The patch forwarded below still applies and compiles against 2.6.10-rc3-mm1.

Please apply.

----- Forwarded message from Adrian Bunk <[email protected]> -----

Date: Sun, 5 Dec 2004 17:57:14 +0100
From: Adrian Bunk <[email protected]>
To: [email protected]
Subject: [2.6 patch] drivers/char/ip2*: misc cleanups

The patch below contains cleanups including the following:
- remove unused variables and functions
- make needlessly global code static

diffstat output:

 drivers/char/ip2/fip_firm.h |    2 -
 drivers/char/ip2/i2cmd.c    |   59 +-----------------------------------
 drivers/char/ip2/i2cmd.h    |   17 ----------
 drivers/char/ip2/i2lib.c    |    2 -
 drivers/char/ip2main.c      |    5 +--
 5 files changed, 6 insertions(+), 79 deletions(-)
drivers/char/ip2/fip_firm.h renamed from drivers/char/ip2/fip_firm.h.old +1 -1
@@ -1,7 +1,7 @@
 /* fip_firm.h - Intelliport II loadware */
 /* -31232 bytes read from ff.lod */
 
-unsigned char fip_firm[] __initdata = {
+static unsigned char fip_firm[] __initdata = {
 0x3C,0x42,0x37,0x18,0x02,0x01,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 0x57,0x65,0x64,0x20,0x44,0x65,0x63,0x20,0x30,0x31,0x20,0x31,0x32,0x3A,0x32,0x34,
 0x3A,0x33,0x30,0x20,0x31,0x39,0x39,0x39,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
drivers/char/ip2/i2cmd.c renamed from drivers/char/ip2/i2cmd.c.old +2 -57

83 lines not on this page · raw message

drivers/char/ip2/i2cmd.h renamed from drivers/char/ip2/i2cmd.h.old +0 -17
@@ -71,9 +71,7 @@
 // there is more than one parameter to assign, we must use a function rather
 // than a macro (used usually).
 //
-extern cmdSyntaxPtr i2cmdSetSeq(UCHAR seqno, UCHAR size, UCHAR *string);
 extern cmdSyntaxPtr i2cmdUnixFlags(USHORT iflag,USHORT cflag,USHORT lflag);
-extern cmdSyntaxPtr i2cmdBaudRemap(UCHAR dest, UCHAR src);
 extern cmdSyntaxPtr i2cmdBaudDef(int which, USHORT rate);
 
 // Declarations for the global arrays used to bear the commands and their
@@ -397,14 +395,6 @@
 // library code in response to data movement and shouldn't ever be sent by the
 // user code. See i2pack.h and the body of i2lib.c for details.
 
-// COMMAND 38: Define the hot-key sequence
-// seqno:  sequence number 0-15
-// size:   number of characters in sequence (1-8)
-// string: pointer to the characters
-// (if size == 0, "undefines" this sequence
-//
-#define CMD_SET_SEQ(seqno,size,string) i2cmdSetSeq(seqno,size,string)
-
 // Enable on-board post-processing, using options given in oflag argument.
 // Formerly, this command was automatically preceded by a CMD_OPOST_OFF command
 // because the loadware does not permit sending back-to-back CMD_OPOST_ON
@@ -458,13 +448,6 @@
 #define CMD_DTRFL_DSAB  (cmdSyntaxPtr)(ct51) // Disable DTR flow control
 #define CMD_BAUD_RESET  (cmdSyntaxPtr)(ct52) // Reset baudrate table
 
-// COMMAND 53: Remap baud rate table
-// dest = index of table entry to be changed
-// src  = index value to substitute.
-// at default mapping table is f(x) = x
-//
-#define CMD_BAUD_REMAP(dest,src) i2cmdBaudRemap(dest,src)
-
 // COMMAND 54: Define custom rate #1
 // rate = (short) 1/10 of the desired baud rate
 //
drivers/char/ip2/i2lib.c renamed from drivers/char/ip2/i2lib.c.old +1 -1
@@ -141,7 +141,7 @@
 //* Code *
 //********
 
-inline int
+static inline int
 i2Validate ( i2ChanStrPtr pCh )
 {
 	//ip2trace(pCh->port_index, ITRC_VERIFY,ITRC_ENTER,2,pCh->validity,
drivers/char/ip2main.c renamed from drivers/char/ip2main.c.old +2 -3
@@ -138,7 +138,7 @@
 #include <linux/proc_fs.h>
 
 static int ip2_read_procmem(char *, char **, off_t, int);
-int ip2_read_proc(char *, char **, off_t, int, int *, void * );
+static int ip2_read_proc(char *, char **, off_t, int, int *, void * );
 
 /********************/
 /* Type Definitions */
@@ -202,7 +202,6 @@
 static void ip2_wait_until_sent(PTTY,int);
 
 static void set_params (i2ChanStrPtr, struct termios *);
-static int set_modem_info(i2ChanStrPtr, unsigned int, unsigned int *);
 static int get_serial_info(i2ChanStrPtr, struct serial_struct __user *);
 static int set_serial_info(i2ChanStrPtr, struct serial_struct __user *);
 
@@ -3097,7 +3096,7 @@
  * different sources including ip2mkdev.c and a couple of other drivers.
  * The bugs are all mine.  :-)	=mhw=
  */
-int ip2_read_proc(char *page, char **start, off_t off,
+static int ip2_read_proc(char *page, char **start, off_t off,
 				int count, int *eof, void *data)
 {
 	int	i, j, box;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

----- End forwarded message -----