From: Olaf Hering <olh@suse.de>

changing CONFIG_LOCALVERSION rebuilds too much, for no appearent reason.

remove code for obsolete kernel versions

Signed-off-by: Olaf Hering <olh@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 arch/cris/arch-v32/drivers/nandflash.c   |    1 -
 arch/cris/arch-v32/drivers/pcf8563.c     |    1 -
 arch/cris/arch-v32/kernel/fasttimer.c    |   25 -------------------------
 drivers/char/speakup/genmap.c            |    3 +--
 drivers/char/speakup/makemapdata.c       |    1 -
 drivers/char/speakup/mod_code.c          |    3 ---
 drivers/char/speakup/speakup.c           |   26 --------------------------
 drivers/char/speakup/speakup_drvcommon.c |    3 ---
 drivers/char/speakup/speakup_keyhelp.c   |    7 -------
 drivers/char/speakup/spk_priv.h          |    6 ------
 drivers/serial/crisv32.c                 |    1 -
 fs/configfs/symlink.c                    |    1 -
 include/linux/speakup.h                  |    2 --
 13 files changed, 1 insertion(+), 79 deletions(-)

diff -puN arch/cris/arch-v32/drivers/nandflash.c~remove-linux-versionh-include-for-mm arch/cris/arch-v32/drivers/nandflash.c
--- devel/arch/cris/arch-v32/drivers/nandflash.c~remove-linux-versionh-include-for-mm	2005-07-26 00:39:02.000000000 -0700
+++ devel-akpm/arch/cris/arch-v32/drivers/nandflash.c	2005-07-26 00:39:02.000000000 -0700
@@ -14,7 +14,6 @@
  *
  */
 
-#include <linux/version.h>
 #include <linux/slab.h>
 #include <linux/init.h>
 #include <linux/module.h>
diff -puN arch/cris/arch-v32/drivers/pcf8563.c~remove-linux-versionh-include-for-mm arch/cris/arch-v32/drivers/pcf8563.c
--- devel/arch/cris/arch-v32/drivers/pcf8563.c~remove-linux-versionh-include-for-mm	2005-07-26 00:39:02.000000000 -0700
+++ devel-akpm/arch/cris/arch-v32/drivers/pcf8563.c	2005-07-26 00:39:02.000000000 -0700
@@ -18,7 +18,6 @@
  */
 
 #include <linux/config.h>
-#include <linux/version.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/types.h>
diff -puN arch/cris/arch-v32/kernel/fasttimer.c~remove-linux-versionh-include-for-mm arch/cris/arch-v32/kernel/fasttimer.c
--- devel/arch/cris/arch-v32/kernel/fasttimer.c~remove-linux-versionh-include-for-mm	2005-07-26 00:39:02.000000000 -0700
+++ devel-akpm/arch/cris/arch-v32/kernel/fasttimer.c	2005-07-26 00:39:02.000000000 -0700
@@ -121,7 +121,6 @@
 #include <asm/system.h>
 
 #include <linux/config.h>
-#include <linux/version.h>
 
 #include <asm/arch/hwregs/reg_map.h>
 #include <asm/arch/hwregs/reg_rdwr.h>
@@ -604,23 +603,9 @@ void schedule_usleep(unsigned long us)
 
 #ifdef CONFIG_PROC_FS
 static int proc_fasttimer_read(char *buf, char **start, off_t offset, int len
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0)
                        ,int *eof, void *data_unused
-#else
-                        ,int unused
-#endif
                                );
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0)
 static struct proc_dir_entry *fasttimer_proc_entry;
-#else
-static struct proc_dir_entry fasttimer_proc_entry =
-{
-  0, 9, "fasttimer",
-  S_IFREG | S_IRUGO, 1, 0, 0,
-  0, NULL /* ops -- default to array */,
-  &proc_fasttimer_read /* get_info */,
-};
-#endif
 #endif /* CONFIG_PROC_FS */
 
 #ifdef CONFIG_PROC_FS
@@ -629,11 +614,7 @@ static struct proc_dir_entry fasttimer_p
 #define BIG_BUF_SIZE (500 + NUM_TIMER_STATS * 300)
 
 static int proc_fasttimer_read(char *buf, char **start, off_t offset, int len
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0)
                        ,int *eof, void *data_unused
-#else
-                        ,int unused
-#endif
                                )
 {
   unsigned long flags;
@@ -809,9 +790,7 @@ static int proc_fasttimer_read(char *buf
 
   memcpy(buf, bigbuf + offset, len);
   *start = buf;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0)
   *eof = 1;
-#endif
 
   return len;
 }
@@ -975,12 +954,8 @@ void fast_timer_init(void)
     printk("fast_timer_init()\n");
 
 #ifdef CONFIG_PROC_FS
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0)
    if ((fasttimer_proc_entry = create_proc_entry( "fasttimer", 0, 0 )))
      fasttimer_proc_entry->read_proc = proc_fasttimer_read;
-#else
-    proc_register_dynamic(&proc_root, &fasttimer_proc_entry);
-#endif
 #endif /* PROC_FS */
     if(request_irq(TIMER_INTR_VECT, timer_trig_interrupt, SA_INTERRUPT,
                    "fast timer int", NULL))
diff -puN drivers/char/speakup/genmap.c~remove-linux-versionh-include-for-mm drivers/char/speakup/genmap.c
--- devel/drivers/char/speakup/genmap.c~remove-linux-versionh-include-for-mm	2005-07-26 00:39:02.000000000 -0700
+++ devel-akpm/drivers/char/speakup/genmap.c	2005-07-26 00:39:02.000000000 -0700
@@ -2,7 +2,6 @@
 #include <stdio.h>
 #include <libgen.h>
 #include <string.h>
-#include <linux/version.h>
 #include <ctype.h>
 
 int get_define(void);
@@ -42,7 +41,7 @@ void open_input( char *name )
 {
 	strcpy( filename, name );
 	if ( ( infile = fopen( filename, "r" ) ) == 0 ) {
-		fprintf( stderr, "can't open %s, version %d\n", filename, LINUX_VERSION_CODE );
+		fprintf( stderr, "can't open %s\n", filename);
 		exit( 1 );
 	}
 	lc = 0;
diff -puN drivers/char/speakup/makemapdata.c~remove-linux-versionh-include-for-mm drivers/char/speakup/makemapdata.c
--- devel/drivers/char/speakup/makemapdata.c~remove-linux-versionh-include-for-mm	2005-07-26 00:39:02.000000000 -0700
+++ devel-akpm/drivers/char/speakup/makemapdata.c	2005-07-26 00:39:02.000000000 -0700
@@ -2,7 +2,6 @@
 #include <stdio.h>
 #include <libgen.h>
 #include <string.h>
-#include <linux/version.h>
 #include <ctype.h>
 
 int get_define(void);
diff -puN drivers/char/speakup/mod_code.c~remove-linux-versionh-include-for-mm drivers/char/speakup/mod_code.c
--- devel/drivers/char/speakup/mod_code.c~remove-linux-versionh-include-for-mm	2005-07-26 00:39:02.000000000 -0700
+++ devel-akpm/drivers/char/speakup/mod_code.c	2005-07-26 00:39:02.000000000 -0700
@@ -12,9 +12,6 @@ static int __init mod_synth_init( void )
 	int status = do_synth_init( &MY_SYNTH );
 	if ( status != 0 ) return status;
 	synth_add( &MY_SYNTH );
-#if (LINUX_VERSION_CODE < 132419)
-//          MOD_INC_USE_COUNT;
-#endif
 	return 0;
 }
 
diff -puN drivers/char/speakup/speakup.c~remove-linux-versionh-include-for-mm drivers/char/speakup/speakup.c
--- devel/drivers/char/speakup/speakup.c~remove-linux-versionh-include-for-mm	2005-07-26 00:39:02.000000000 -0700
+++ devel-akpm/drivers/char/speakup/speakup.c	2005-07-26 00:39:02.000000000 -0700
@@ -25,16 +25,10 @@
 #define __KERNEL_SYSCALLS__
 
 #include <linux/kernel.h>
-#include <linux/version.h>
 #include <linux/vt.h>
 #include <linux/tty.h>
 #include <linux/mm.h> /* __get_free_page( ) and friends */
 #include <linux/vt_kern.h>
-#if (LINUX_VERSION_CODE < 132419)
-#include <linux/console_struct.h>
-#include <linux/kbd_ll.h>
-#include <asm/keyboard.h>
-#endif
 #include <linux/ctype.h>
 #include <linux/selection.h>
 #include <asm/uaccess.h> /* copy_from|to|user( ) and others */
@@ -108,19 +102,12 @@ static u_char key_defaults[] = {
 #include "speakupmap.h"
 };
 
-#if (LINUX_VERSION_CODE < 132419)
-extern struct tty_struct *tty;
-typedef void (*k_handler_fn)(unsigned char value, char up_flag);
-#define KBD_PROTO u_char value, char up_flag
-#define KBD_ARGS value, up_flag
-#else
 struct tty_struct *tty;
 #define key_handler k_handler
 typedef void (*k_handler_fn)(struct vc_data *vc, unsigned char value,
                             char up_flag, struct pt_regs *regs);
 #define KBD_PROTO struct vc_data *vc, u_char value, char up_flag, struct pt_regs *regs
 #define KBD_ARGS vc, value, up_flag, regs
-#endif
 extern k_handler_fn key_handler[16];
 static k_handler_fn do_shift, do_spec, do_latin, do_cursor;
 EXPORT_SYMBOL( help_handler );
@@ -1292,9 +1279,7 @@ void __init speakup_open (struct vc_data
 	speakup_date( vc);
 	pr_info ("%s: initialized\n", SPEAKUP_VERSION );
 	init_timer (&cursor_timer );
-#if (LINUX_VERSION_CODE >= 132419)
 	cursor_timer.entry.prev=NULL;
-#endif
 	cursor_timer.function = cursor_done;
 	init_sleeper ( synth_sleeping_list );
 	strlwr (synth_name );
@@ -2087,13 +2072,8 @@ load_help ( void *dummy )
 	} else synth_write_string( "help module not found" );
 }
 
-#if (LINUX_VERSION_CODE >= 132419)
 static DECLARE_WORK(ld_help, load_help, NULL);
 #define schedule_help schedule_work
-#else
-static struct tq_struct ld_help = { routine: load_help, };
-#define schedule_help schedule_task
-#endif
 
 static void
 speakup_help (struct vc_data *vc )
@@ -2160,18 +2140,12 @@ void do_spkup( struct vc_data *vc,u_char
 	static const char *pad_chars = "0123456789+-*/\015,.?()";
 
 int
-#if (LINUX_VERSION_CODE < 132419)
-speakup_key ( int shift_state, u_char keycode, u_short keysym, u_char up_flag )
-#else
 speakup_key (struct vc_data *vc, int shift_state, int keycode, u_short keysym, int up_flag, struct pt_regs *regs )
-#endif
 {
 	u_char *key_info;
 	u_char type = KTYP( keysym ), value = KVAL( keysym ), new_key = 0;
 	u_char shift_info, offset;
-#if (LINUX_VERSION_CODE >= 132419)
 	tty = vc->vc_tty;
-#endif
 	if ( synth == NULL ) return 0;
 	if ( type >= 0xf0 ) type -= 0xf0;
 	if ( type == KT_PAD && (vc_kbd_led(kbd , VC_NUMLOCK ) ) ) {
diff -puN drivers/char/speakup/speakup_drvcommon.c~remove-linux-versionh-include-for-mm drivers/char/speakup/speakup_drvcommon.c
--- devel/drivers/char/speakup/speakup_drvcommon.c~remove-linux-versionh-include-for-mm	2005-07-26 00:39:02.000000000 -0700
+++ devel-akpm/drivers/char/speakup/speakup_drvcommon.c	2005-07-26 00:39:02.000000000 -0700
@@ -1,6 +1,5 @@
 #define KERNEL
 #include <linux/config.h>
-#include <linux/version.h>
 #include <linux/types.h>
 #include <linux/ctype.h>	/* for isdigit( ) and friends */
 #include <linux/fs.h>
@@ -304,9 +303,7 @@ int do_synth_init ( struct spk_synth *in
 	synth_time_vars[2].default_val = synth->jiffies;
 	synth_time_vars[3].default_val = synth->full;
 	  synth_timer.function = synth->catch_up;
-#if (LINUX_VERSION_CODE >= 132419)
 	  synth_timer.entry.prev = NULL;
-#endif
 	  init_timer ( &synth_timer );
 	  for ( n_var = synth_time_vars; n_var->var_id >= 0; n_var++ )
 	    speakup_register_var( n_var );
diff -puN drivers/char/speakup/speakup_keyhelp.c~remove-linux-versionh-include-for-mm drivers/char/speakup/speakup_keyhelp.c
--- devel/drivers/char/speakup/speakup_keyhelp.c~remove-linux-versionh-include-for-mm	2005-07-26 00:39:02.000000000 -0700
+++ devel-akpm/drivers/char/speakup/speakup_keyhelp.c	2005-07-26 00:39:02.000000000 -0700
@@ -20,7 +20,6 @@
     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
 
-#include <linux/version.h>
 #include <linux/keyboard.h>
 #include "spk_priv.h"
 
@@ -201,9 +200,6 @@ static int handle_help ( struct vc_data 
 	if ( type == KT_LATIN ) {
 		if ( ch == SPACE ) {
 			special_handler = NULL;
-#if (LINUX_VERSION_CODE < 132419)
-			MOD_DEC_USE_COUNT;
-#endif
 			synth_write_msg( "leaving help" );
 			return 1;
 		}
@@ -224,9 +220,6 @@ static int handle_help ( struct vc_data 
 		else return -1;
 	} else if (type == KT_SPKUP && ch == SPEAKUP_HELP && !special_handler) {
 		special_handler = help_handler;
-#if (LINUX_VERSION_CODE < 132419)
-		MOD_INC_USE_COUNT;
-#endif
 		synth_write_msg( help_info );
 		build_key_data( ); /* rebuild each time in case new mapping */
 		return 1;
diff -puN drivers/char/speakup/spk_priv.h~remove-linux-versionh-include-for-mm drivers/char/speakup/spk_priv.h
--- devel/drivers/char/speakup/spk_priv.h~remove-linux-versionh-include-for-mm	2005-07-26 00:39:02.000000000 -0700
+++ devel-akpm/drivers/char/speakup/spk_priv.h	2005-07-26 00:39:02.000000000 -0700
@@ -25,7 +25,6 @@
 #define __SPEAKUP_PRIVATE_H
 
 #define KERNEL
-#include <linux/version.h>
 #include <linux/config.h>
 #include <linux/types.h>
 #include <linux/fs.h>
@@ -209,13 +208,8 @@ void spk_serial_release( void );
 extern int synth_port_tts, synth_port_forced;
 extern volatile int synth_timer_active;
 #define declare_timer( name ) struct timer_list name;
-#if (LINUX_VERSION_CODE >= 132419)
 #define start_timer( name ) if ( ! name.entry.prev ) add_timer ( & name )
 #define stop_timer( name ) del_timer ( & name ); name.entry.prev = NULL
-#else
-#define start_timer( name ) if ( ! name.list.prev ) add_timer ( & name )
-#define stop_timer( name ) del_timer ( & name )
-#endif
 #define declare_sleeper( name ) wait_queue_head_t name
 #define init_sleeper( name ) 	init_waitqueue_head ( &name )
 extern declare_sleeper( synth_sleeping_list );
diff -puN drivers/serial/crisv32.c~remove-linux-versionh-include-for-mm drivers/serial/crisv32.c
--- devel/drivers/serial/crisv32.c~remove-linux-versionh-include-for-mm	2005-07-26 00:39:02.000000000 -0700
+++ devel-akpm/drivers/serial/crisv32.c	2005-07-26 00:39:02.000000000 -0700
@@ -198,7 +198,6 @@
 static char *serial_version = "$Revision: 1.50 $";
 
 #include <linux/config.h>
-#include <linux/version.h>
 
 #include <linux/types.h>
 #include <linux/errno.h>
diff -puN fs/configfs/symlink.c~remove-linux-versionh-include-for-mm fs/configfs/symlink.c
--- devel/fs/configfs/symlink.c~remove-linux-versionh-include-for-mm	2005-07-26 00:39:02.000000000 -0700
+++ devel-akpm/fs/configfs/symlink.c	2005-07-26 00:39:02.000000000 -0700
@@ -24,7 +24,6 @@
  * configfs Copyright (C) 2005 Oracle.  All rights reserved.
  */
 
-#include <linux/version.h>
 #include <linux/fs.h>
 #include <linux/module.h>
 #include <linux/namei.h>
diff -puN include/linux/speakup.h~remove-linux-versionh-include-for-mm include/linux/speakup.h
--- devel/include/linux/speakup.h~remove-linux-versionh-include-for-mm	2005-07-26 00:39:02.000000000 -0700
+++ devel-akpm/include/linux/speakup.h	2005-07-26 00:39:02.000000000 -0700
@@ -1,8 +1,6 @@
 #ifndef __SPEAKUP_H
 #define __SPEAKUP_H
 
-#include <linux/version.h>
-
 struct kbd_struct;
 struct vc_data;
 
_