misc drivers/char/ cleanups (fwd)
Subsystems (3)
PATCH 1/1 misc drivers/char/ cleanups (fwd)
The patch forwarded below still applies and compiles against 2.6.10-rc2-mm3.
----- Forwarded message from Adrian Bunk <[email protected]> -----
Date: Sun, 7 Nov 2004 01:58:52 +0100
From: Adrian Bunk <[email protected]>
To: [email protected]
Subject: [2.6 patch] misc drivers/char/ cleanups
Below are misc drivers/char/ cleanups.
Most of this consists of:
- removal of unused code
- make needlessly global code static
Please review and comment on this patch.
diffstat output:
drivers/char/esp.c | 2 drivers/char/genrtc.c | 2 drivers/char/hw_random.c | 2 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 drivers/char/istallion.c | 40 --- drivers/char/keyboard.c | 20 - drivers/char/lp.c | 4 drivers/char/moxa.c | 18 - drivers/char/mwave/3780i.c | 29 -- drivers/char/mwave/3780i.h | 5 drivers/char/mwave/smapi.c | 16 - drivers/char/mxser.c | 4 drivers/char/n_tty.c | 4 drivers/char/pcmcia/synclink_cs.c | 24 +- drivers/char/pty.c | 2 drivers/char/specialix.c | 91 ++------ drivers/char/stallion.c | 37 --- drivers/char/synclink.c | 313 ++++++++++++++---------------- drivers/char/tipar.c | 4 drivers/char/toshiba.c | 2 drivers/char/tty_io.c | 36 --- drivers/char/tty_ioctl.c | 2 include/linux/lp.h | 6 27 files changed, 244 insertions(+), 504 deletions(-)
drivers/char/esp.c renamed from drivers/char/esp.c.old +1 -1
@@ -2401,7 +2401,7 @@/* * The serial driver boot-time initialization code! */ -int __init espserial_init (void ) +static int __init espserial_init (void ) {int i, offset;struct esp_struct * info;
drivers/char/genrtc.c renamed from drivers/char/genrtc.c.old +1 -1
@@ -83,7 +83,7 @@static int irq_active;#ifdef CONFIG_GEN_RTC_X -struct work_struct genrtc_task; +static struct work_struct genrtc_task;static struct timer_list timer_task;static unsigned int oldsecs;
drivers/char/hw_random.c renamed from drivers/char/hw_random.c.old +1 -1
@@ -369,7 +369,7 @@ VIA_RNG_CHUNK_1_MASK = 0xFF, }; -u32 via_rng_datum; +static u32 via_rng_datum;/* * Investigate using the 'rep' prefix to obtain 32 bits of random data
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/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/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/i2cmd.c renamed from drivers/char/ip2/i2cmd.c.old +2 -57
83 lines not on this page · raw message
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;
drivers/char/istallion.c renamed from drivers/char/istallion.c.old +7 -33
@@ -288,7 +288,6 @@/*****************************************************************************/ -#ifdef MODULE /* * Define some string labels for arguments passed from the module * load line. These allow for easy board definitions, and easy
@@ -387,8 +386,6 @@MODULE_PARM (board3,"1-3s" );MODULE_PARM_DESC (board3,"Board 3 config -> name[,ioaddr[,memaddr]" ); -#endif -/* * Set up a default memory address table for EISA board probing. * The default addresses are all bellow 1Mbyte, which has to be the
@@ -406,7 +403,6 @@ };static int stli_eisamempsize =sizeof (stli_eisamemprobeaddrs) /sizeof (unsigned long ); -int stli_eisaprobe =STLI_EISAPROBE ;/* * Define the Stallion PCI vendor and device IDs.
@@ -650,14 +646,12 @@* Prototype all functions in this driver! */ -#ifdef MODULE static void stli_argbrds (void );static int stli_parsebrd (stlconf_t *confp,char **argp);static unsigned long stli_atol (char *str); -#endif -int stli_init (void ); +static int stli_init (void );static int stli_open (struct tty_struct *tty,struct file *filp);static void stli_close (struct tty_struct *tty,struct file *filp);static int stli_write (struct tty_struct *tty,const unsigned char *buf,int count);
@@ -793,20 +787,10 @@static struct class_simple *istallion_class; -#ifdef MODULE - -/* -* Loadable module initialization stuff. -*/ - -static int __init istallion_module_init (void ) +static int __init istallion_init (void ) {unsigned long flags; -#ifdef DEBUG -printk ("init_module()\n" ); -#endif -save_flags (flags);cli ();stli_init ();
@@ -817,17 +801,13 @@/*****************************************************************************/ -static void __exit istallion_module_exit(void) +static void __exit istallion_exit(void) {stlibrd_t *brdp;stliport_t *portp;unsigned long flags;int i, j; -#ifdef DEBUG -printk ("cleanup_module()\n" ); -#endif -printk (KERN_INFO "Unloading %s: version %s\n" , stli_drvtitle, stli_drvversion);
@@ -887,8 +867,8 @@restore_flags (flags); } -module_init (istallion_module_init); -module_exit (istallion_module_exit); +module_init (istallion_init); +module_exit (istallion_exit);/*****************************************************************************/
@@ -998,8 +978,6 @@return (1 ); } -#endif -/*****************************************************************************/ /*
@@ -4676,9 +4654,7 @@*/ for (i =0 ; (i < stli_nrbrds); i++) { confp = &stli_brdconf[i]; -#ifdef MODULE stli_parsebrd (confp, stli_brdsp[i]); -#endif if ((brdp =stli_allocbrd ()) == (stlibrd_t *)NULL )return (-ENOMEM ); brdp->brdnr = i;
@@ -4692,10 +4668,8 @@* Static configuration table done, so now use dynamic methods to * see if any more boards should be configured. */ -#ifdef MODULE stli_argbrds (); -#endif -if (stli_eisaprobe) +if (STLI_EISAPROBE )stli_findeisabrds ();#ifdef CONFIG_PCI stli_findpcibrds ();
@@ -5220,7 +5194,7 @@/*****************************************************************************/ -int __init stli_init (void ) +static int __init stli_init (void ) {int i;printk (KERN_INFO "%s: version %s\n" , stli_drvtitle, stli_drvversion);
drivers/char/keyboard.c renamed from drivers/char/keyboard.c.old +4 -16
@@ -330,7 +330,7 @@* in utf-8 already. UTF-8 is defined for words of up to 31 bits, * but we need only 16 bits here */ -void to_utf8 (struct vc_data *vc,ushort c) +static void to_utf8 (struct vc_data *vc,ushort c) {if (c <0x80 )/* 0******* */
@@ -392,7 +392,7 @@* Otherwise, conclude that DIACR was not combining after all, * queue it and return CH. */ -unsigned char handle_diacr (struct vc_data *vc,unsigned char ch) +static unsigned char handle_diacr (struct vc_data *vc,unsigned char ch) {int d = diacr;int i;
@@ -853,18 +853,6 @@set_leds (); } -void register_leds (struct kbd_struct *kbd,unsigned int led, -unsigned int *addr,unsigned int mask) -{ -if (led <3 ) { - ledptrs[led].addr = addr; - ledptrs[led].mask = mask; - ledptrs[led].valid =1 ; - kbd->ledmode =LED_SHOW_MEM ; - }else - kbd->ledmode =LED_SHOW_FLAGS ; -} -static inline unsigned char getleds (void ) {struct kbd_struct *kbd = kbd_table + fg_console;
@@ -925,7 +913,7 @@/* * This allows a newly plugged keyboard to pick the LED state. */ -void kbd_refresh_leds (struct input_handle *handle) +static void kbd_refresh_leds (struct input_handle *handle) {unsigned char leds = ledstate;
@@ -1027,7 +1015,7 @@ }#endif -void kbd_rawcode (unsigned char data) +static void kbd_rawcode (unsigned char data) {struct vc_data *vc = vc_cons[fg_console].d; kbd = kbd_table + fg_console;
include/linux/lp.h renamed from include/linux/lp.h.old +0 -6
@@ -186,12 +186,6 @@*/ #define LP_DELAY 50 -/* -* function prototypes -*/ - -extern int lp_init (void ); -#endif #endif
drivers/char/lp.c renamed from drivers/char/lp.c.old +2 -2
@@ -142,7 +142,7 @@/* ROUND_UP macro from fs/select.c */ #define ROUND_UP (x,y) (((x)+(y)-1)/(y)) -struct lp_struct lp_table[LP_NO ]; +static struct lp_struct lp_table[LP_NO ];static unsigned int lp_count =0 ;static struct class_simple *lp_class;
@@ -867,7 +867,7 @@ .detach = lp_detach, }; -int __init lp_init (void ) +static int __init lp_init (void ) {int i, err =0 ;
drivers/char/moxa.c renamed from drivers/char/moxa.c.old +0 -18
@@ -1765,7 +1765,6 @@* 2. MoxaPortEnable(int port); * * 3. MoxaPortDisable(int port); * * 4. MoxaPortGetMaxBaud(int port); * -* 5. MoxaPortGetCurBaud(int port); * * 6. MoxaPortSetBaud(int port, long baud); * * 7. MoxaPortSetMode(int port, int databit, int stopbit, int parity); * * 8. MoxaPortSetTermio(int port, unsigned char *termio); *
@@ -1876,15 +1875,6 @@* 38400/57600/115200 bps * * -* Function 9: Get the current baud rate of this port. -* Syntax: -* long MoxaPortGetCurBaud(int port); -* int port : port number (0 - 127) -* -* return: 0 : this port is invalid -* 50 - 115200 bps -* -* * Function 10: Setting baud rate of this port. * Syntax: * long MoxaPortSetBaud(int port, long baud);
@@ -3093,14 +3083,6 @@return (0 ); } -long MoxaPortGetCurBaud (int port) -{ - -if (moxaChkPort[port] ==0 ) -return (0 ); -return (moxaCurBaud[port]); -} -static void MoxaSetFifo (int port,int enable) {void __iomem *ofsAddr = moxaTableAddr[port];
drivers/char/mwave/3780i.h renamed from drivers/char/mwave/3780i.h.old +0 -5
@@ -338,10 +338,6 @@ unsigned long ulMsaAddr);void dsp3780I_WriteMsaCfg (unsigned short usDspBaseIO,unsigned long ulMsaAddr,unsigned short usValue); -void dsp3780I_WriteGenCfg (unsigned short usDspBaseIO,unsigned uIndex, -unsigned char ucValue); -unsigned char dsp3780I_ReadGenCfg (unsigned short usDspBaseIO, -unsigned uIndex);int dsp3780I_GetIPCSource (unsigned short usDspBaseIO,unsigned short *pusIPCSource);
@@ -352,7 +348,6 @@#define WriteMsaCfg (addr,value) dsp3780I_WriteMsaCfg(usDspBaseIO,addr,value)#define ReadMsaCfg (addr) dsp3780I_ReadMsaCfg(usDspBaseIO,addr)#define WriteGenCfg (index,value) dsp3780I_WriteGenCfg(usDspBaseIO,index,value) -#define ReadGenCfg (index) dsp3780I_ReadGenCfg(usDspBaseIO,index)#define InWordDsp (index) inw(usDspBaseIO+index)#define InByteDsp (index) inb(usDspBaseIO+index)
drivers/char/mwave/3780i.c renamed from drivers/char/mwave/3780i.c.old +1 -28
@@ -107,7 +107,7 @@spin_unlock_irqrestore (&dsp_lock, flags); } -void dsp3780I_WriteGenCfg (unsigned short usDspBaseIO,unsigned uIndex, +static void dsp3780I_WriteGenCfg (unsigned short usDspBaseIO,unsigned uIndex,unsigned char ucValue) {DSP_ISA_SLAVE_CONTROL rSlaveControl;
@@ -141,33 +141,6 @@ } -unsigned char dsp3780I_ReadGenCfg (unsigned short usDspBaseIO, -unsigned uIndex) -{ -DSP_ISA_SLAVE_CONTROL rSlaveControl; -DSP_ISA_SLAVE_CONTROL rSlaveControl_Save; -unsigned char ucValue; - - -PRINTK_3 (TRACE_3780I , -"3780i::dsp3780i_ReadGenCfg entry usDspBaseIO %x uIndex %x\n" , - usDspBaseIO, uIndex); - -MKBYTE (rSlaveControl) =InByteDsp (DSP_IsaSlaveControl); - rSlaveControl_Save = rSlaveControl; - rSlaveControl.ConfigMode = TRUE; -OutByteDsp (DSP_IsaSlaveControl,MKBYTE (rSlaveControl)); -OutByteDsp (DSP_ConfigAddress, (unsigned char ) uIndex); - ucValue =InByteDsp (DSP_ConfigData); -OutByteDsp (DSP_IsaSlaveControl,MKBYTE (rSlaveControl_Save)); - -PRINTK_2 (TRACE_3780I , -"3780i::dsp3780i_ReadGenCfg exit ucValue %x\n" , ucValue); - - -return ucValue; -} -int dsp3780I_EnableDSP (DSP_3780I_CONFIG_SETTINGS * pSettings,unsigned short *pIrqMap,unsigned short *pDmaMap)
drivers/char/mwave/smapi.c renamed from drivers/char/mwave/smapi.c.old +8 -8
@@ -54,11 +54,11 @@static unsigned short g_usSmapiPort =0 ; -int smapi_request (unsigned short inBX,unsigned short inCX, -unsigned short inDI,unsigned short inSI, -unsigned short *outAX,unsigned short *outBX, -unsigned short *outCX,unsigned short *outDX, -unsigned short *outDI,unsigned short *outSI) +static int smapi_request (unsigned short inBX,unsigned short inCX, +unsigned short inDI,unsigned short inSI, +unsigned short *outAX,unsigned short *outBX, +unsigned short *outCX,unsigned short *outDX, +unsigned short *outDI,unsigned short *outSI) {unsigned short myoutAX =2 , *pmyoutAX = &myoutAX;unsigned short myoutBX =3 , *pmyoutBX = &myoutBX;
@@ -511,8 +511,8 @@return bRC; } - -int SmapiQuerySystemID (void ) +#if 0 +static int SmapiQuerySystemID (void ) {int bRC = -EIO ; unsigned short usAX = 0xffff, usBX = 0xffff, usCX = 0xffff,
@@ -531,7 +531,7 @@ return bRC; } - +#endif /* 0 */ int smapi_init (void ) {
drivers/char/mxser.c renamed from drivers/char/mxser.c.old +2 -2
@@ -321,7 +321,7 @@0 ,50 ,75 ,110 ,134 ,150 ,200 ,300 ,600 ,1200 ,1800 ,2400 ,4800 , 9600, 19200, 38400, 57600, 115200, 230400, 460800, 921600, 0}; -struct mxser_hwconf mxsercfg[MXSER_BOARDS ]; +static struct mxser_hwconf mxsercfg[MXSER_BOARDS ];/* * static functions:
@@ -389,7 +389,7 @@ } -int mxser_initbrd (int board,struct mxser_hwconf *hwconf) +static int mxser_initbrd (int board,struct mxser_hwconf *hwconf) {struct mxser_struct *info;unsigned long flags;
drivers/char/n_tty.c renamed from drivers/char/n_tty.c.old +2 -2
@@ -152,7 +152,7 @@* lock_kernel() still. */ -void n_tty_flush_buffer (struct tty_struct * tty) +static void n_tty_flush_buffer (struct tty_struct * tty) {/* clear everything and unthrottle the driver */ reset_buffer_flags (tty);
@@ -174,7 +174,7 @@* at this instant in time. */ -ssize_t n_tty_chars_in_buffer (struct tty_struct *tty) +static ssize_t n_tty_chars_in_buffer (struct tty_struct *tty) {unsigned long flags;ssize_t n =0 ;
drivers/char/pcmcia/synclink_cs.c renamed from drivers/char/pcmcia/synclink_cs.c.old +12 -12
@@ -923,7 +923,7 @@/* Return next bottom half action to perform. * or 0 if nothing to do. */ -int bh_action (MGSLPC_INFO *info) +static int bh_action (MGSLPC_INFO *info) {unsigned long flags;int rc =0 ;
@@ -1017,7 +1017,7 @@ }/* eom: non-zero = end of frame */ -void rx_ready_hdlc (MGSLPC_INFO *info,int eom) +static void rx_ready_hdlc (MGSLPC_INFO *info,int eom) {unsigned char data[2 ];unsigned char fifo_count, read_count, i;
@@ -1079,7 +1079,7 @@issue_command (info,CHA ,CMD_RXFIFO ); } -void rx_ready_async (MGSLPC_INFO *info,int tcd) +static void rx_ready_async (MGSLPC_INFO *info,int tcd) {unsigned char data, status;int fifo_count;
@@ -1153,7 +1153,7 @@ } -void tx_done (MGSLPC_INFO *info) +static void tx_done (MGSLPC_INFO *info) {if (!info->tx_active)return ;
@@ -1190,7 +1190,7 @@ } } -void tx_ready (MGSLPC_INFO *info) +static void tx_ready (MGSLPC_INFO *info) {unsigned char fifo_count =32 ;int c;
@@ -1239,7 +1239,7 @@ } } -void cts_change (MGSLPC_INFO *info) +static void cts_change (MGSLPC_INFO *info) {get_signals (info);if ((info->cts_chkcount)++ >=IO_PIN_SHUTDOWN_LIMIT )
@@ -1276,7 +1276,7 @@ info->pending_bh |=BH_STATUS ; } -void dcd_change (MGSLPC_INFO *info) +static void dcd_change (MGSLPC_INFO *info) {get_signals (info);if ((info->dcd_chkcount)++ >=IO_PIN_SHUTDOWN_LIMIT )
@@ -1310,7 +1310,7 @@ info->pending_bh |=BH_STATUS ; } -void dsr_change (MGSLPC_INFO *info) +static void dsr_change (MGSLPC_INFO *info) {get_signals (info);if ((info->dsr_chkcount)++ >=IO_PIN_SHUTDOWN_LIMIT )
@@ -1325,7 +1325,7 @@ info->pending_bh |=BH_STATUS ; } -void ri_change (MGSLPC_INFO *info) +static void ri_change (MGSLPC_INFO *info) {get_signals (info);if ((info->ri_chkcount)++ >=IO_PIN_SHUTDOWN_LIMIT )
@@ -2955,7 +2955,7 @@/* Called to print information about devices */ -int mgslpc_read_proc (char *page,char **start,off_t off,int count, +static int mgslpc_read_proc (char *page,char **start,off_t off,int count,int *eof,void *data) {int len =0 , l;
@@ -3212,7 +3212,7 @@module_init (synclink_cs_init);module_exit (synclink_cs_exit); -void mgslpc_set_rate (MGSLPC_INFO *info,unsigned char channel,unsigned int rate) +static void mgslpc_set_rate (MGSLPC_INFO *info,unsigned char channel,unsigned int rate) {unsigned int M ,N ;unsigned char val;
@@ -3248,7 +3248,7 @@/* Enabled the AUX clock output at the specified frequency. */ -void enable_auxclk (MGSLPC_INFO *info) +static void enable_auxclk (MGSLPC_INFO *info) {unsigned char val;
drivers/char/pty.c renamed from drivers/char/pty.c.old +1 -1
@@ -35,7 +35,7 @@/* These are global because they are accessed in tty_io.c */ #ifdef CONFIG_UNIX98_PTYS struct tty_driver *ptm_driver; -struct tty_driver *pts_driver; +static struct tty_driver *pts_driver;#endif static void pty_close (struct tty_struct * tty,struct file * filp)
drivers/char/specialix.c renamed from drivers/char/specialix.c.old +27 -64
148 lines not on this page · raw message
drivers/char/stallion.c renamed from drivers/char/stallion.c.old +6 -31
@@ -240,7 +240,6 @@/*****************************************************************************/ -#ifdef MODULE /* * Define some string labels for arguments passed from the module * load line. These allow for easy board definitions, and easy
@@ -316,8 +315,6 @@MODULE_PARM (board3,"1-4s" );MODULE_PARM_DESC (board3,"Board 3 config -> name[,ioaddr[,ioaddr2][,irq]]" ); -#endif -/*****************************************************************************/ /*
@@ -472,14 +469,12 @@* Declare all those functions in this driver! */ -#ifdef MODULE static void stl_argbrds (void );static int stl_parsebrd (stlconf_t *confp,char **argp);static unsigned long stl_atol (char *str); -#endif -int stl_init (void ); +static int stl_init (void );static int stl_open (struct tty_struct *tty,struct file *filp);static void stl_close (struct tty_struct *tty,struct file *filp);static int stl_write (struct tty_struct *tty,const unsigned char *buf,int count);
@@ -735,20 +730,10 @@static struct class_simple *stallion_class; -#ifdef MODULE - -/* -* Loadable module initialization stuff. -*/ - -static int __init stallion_module_init (void ) +static int __init stallion_init (void ) {unsigned long flags; -#ifdef DEBUG -printk ("init_module()\n" ); -#endif -save_flags (flags);cli ();stl_init ();
@@ -759,7 +744,7 @@/*****************************************************************************/ -static void __exit stallion_module_exit(void) +static void __exit stallion_exit(void) {stlbrd_t *brdp;stlpanel_t *panelp;
@@ -767,10 +752,6 @@unsigned long flags;int i, j, k; -#ifdef DEBUG -printk ("cleanup_module()\n" ); -#endif -printk (KERN_INFO "Unloading %s: version %s\n" , stl_drvtitle, stl_drvversion);
@@ -838,8 +819,8 @@restore_flags (flags); } -module_init (stallion_module_init); -module_exit (stallion_module_exit); +module_init (stallion_init); +module_exit (stallion_exit);/*****************************************************************************/
@@ -959,8 +940,6 @@return (1 ); } -#endif -/*****************************************************************************/ /*
@@ -2807,9 +2786,7 @@*/ for (i =0 ; (i < stl_nrbrds); i++) { confp = &stl_brdconf[i]; -#ifdef MODULE stl_parsebrd (confp, stl_brdsp[i]); -#endif if ((brdp =stl_allocbrd ()) == (stlbrd_t *)NULL )return (-ENOMEM ); brdp->brdnr = i;
@@ -2825,9 +2802,7 @@* Find any dynamically supported boards. That is via module load * line options or auto-detected on the PCI bus. */ -#ifdef MODULE stl_argbrds (); -#endif #ifdef CONFIG_PCI stl_findpcibrds ();#endif
@@ -3098,7 +3073,7 @@/*****************************************************************************/ -int __init stl_init (void ) +static int __init stl_init (void ) {int i;printk (KERN_INFO "%s: version %s\n" , stl_drvtitle, stl_drvversion);
drivers/char/synclink.c renamed from drivers/char/synclink.c.old +152 -161
840 lines not on this page · raw message
drivers/char/tipar.c renamed from drivers/char/tipar.c.old +2 -2
@@ -489,7 +489,7 @@ .detach = tipar_detach, }; -int __init +static int __init tipar_init_module (void ) {int err =0 ;
@@ -526,7 +526,7 @@return err; } -void __exit +static void __exittipar_cleanup_module (void ) {unsigned int i;
drivers/char/toshiba.c renamed from drivers/char/toshiba.c.old +1 -1
@@ -407,7 +407,7 @@* laptop, otherwise zero and determines the Machine ID, BIOS version and * date, and SCI version. */ -int tosh_probe (void ) +static int tosh_probe (void ) {int i,major,minor,day,year,month,flag;unsigned char signature[7 ] = {0x54 ,0x4f ,0x53 ,0x48 ,0x49 ,0x42 ,0x41 };
drivers/char/tty_io.c renamed from drivers/char/tty_io.c.old +7 -29
@@ -149,8 +149,8 @@static int tty_open (struct inode *,struct file *);static int ptmx_open (struct inode *,struct file *);static int tty_release (struct inode *,struct file *); -int tty_ioctl (struct inode * inode,struct file * file, -unsigned int cmd,unsigned long arg); +static int tty_ioctl (struct inode * inode,struct file * file, +unsigned int cmd,unsigned long arg);static int tty_fasync (int fd,struct file * filp,int on);extern void rs_360_init (void );static void release_mem (struct tty_struct *tty,int idx);
@@ -327,7 +327,7 @@EXPORT_SYMBOL_GPL (tty_ldisc_put); -void tty_ldisc_assign (struct tty_struct *tty,struct tty_ldisc *ld) +static void tty_ldisc_assign (struct tty_struct *tty,struct tty_ldisc *ld) { tty->ldisc = *ld; tty->ldisc.refcount =0 ;
@@ -583,7 +583,7 @@/* * This routine returns a tty driver structure, given a device number */ -struct tty_driver *get_tty_driver (dev_t device,int *index) +static struct tty_driver *get_tty_driver (dev_t device,int *index) {struct tty_driver *p;
@@ -744,7 +744,7 @@* but doesn't hold any locks, so we need to make sure we have the appropriate * locks for what we're doing.. */ -void do_tty_hangup (void *data) +static void do_tty_hangup (void *data) {struct tty_struct *tty = (struct tty_struct *) data;struct file * cons_filp =NULL ;
@@ -2211,8 +2211,8 @@/* * Split this up, as gcc can choke on it otherwise.. */ -int tty_ioctl (struct inode * inode,struct file * file, -unsigned int cmd,unsigned long arg) +static int tty_ioctl (struct inode * inode,struct file * file, +unsigned int cmd,unsigned long arg) {struct tty_struct *tty, *real_tty;void __user *p = (void __user *)arg;
@@ -2504,28 +2504,6 @@ }/* -* Call the ldisc flush directly from a driver. This function may -* return an error and need retrying by the user. -*/ - -int tty_push_data (struct tty_struct *tty,unsigned char *cp,unsigned char *fp,int count) -{ -int ret =0 ; -struct tty_ldisc *disc; - - disc =tty_ldisc_ref (tty); -if (test_bit (TTY_DONT_FLIP , &tty->flags)) - ret = -EAGAIN ; -else if (disc ==NULL ) - ret = -EIO ; -else - disc->receive_buf (tty, cp, fp, count); -tty_ldisc_deref (disc); -return ret; - -} - -/* * Routine which returns the baud rate of the tty * * Note that the baud_table needs to be kept in sync with the
drivers/char/tty_ioctl.c renamed from drivers/char/tty_ioctl.c.old +1 -1
@@ -372,7 +372,7 @@/* * Send a high priority character to the tty. */ -void send_prio_char (struct tty_struct *tty,char ch) +static void send_prio_char (struct tty_struct *tty,char ch) {int was_stopped = tty->stopped;
-
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 -----