patch-1.3.33 linux/drivers/char/istallion.c

Next file: linux/drivers/char/kbd_kern.h
Previous file: linux/drivers/char/cyclades.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.32/linux/drivers/char/istallion.c linux/drivers/char/istallion.c
@@ -226,14 +226,6 @@
 	INIT_C_CC
 };
 
-/*
- *	Memory allocation vars. These keep track of what memory allocation
- *	we can currently use. They help deal with memory in a consistent
- *	way, whether during init or run-time.
- */
-static int	stli_meminited = 0;
-static long	stli_memend;
-
 /*****************************************************************************/
 
 /*
@@ -587,13 +579,10 @@
 #ifdef MODULE
 int		init_module(void);
 void		cleanup_module(void);
-#else
-static void	stli_meminit(long base);
-static long	stli_memhalt(void);
 #endif
 static void	*stli_memalloc(int len);
 
-long		stli_init(long kmem_start);
+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, int from_user, const unsigned char *buf, int count);
@@ -738,7 +727,7 @@
 
 	save_flags(flags);
 	cli();
-	stli_init(0);
+	stli_init();
 	restore_flags(flags);
 
 	return(0);
@@ -824,33 +813,9 @@
  *	which are tightly controlled.
  */
 
-#ifndef MODULE
-
-static void stli_meminit(long base)
-{
-	stli_memend = base;
-	stli_meminited = 1;
-}
-
-static long stli_memhalt()
-{
-	stli_meminited = 0;
-	return(stli_memend);
-}
-
-#endif
-
 static void *stli_memalloc(int len)
 {
-	void	*mem;
-
-	if (stli_meminited) {
-		mem = (void *) stli_memend;
-		stli_memend += len;
-	} else {
-		mem = (void *) kmalloc(len, GFP_KERNEL);
-	}
-	return(mem);
+	return (void *) kmalloc(len, GFP_KERNEL);
 }
 
 /*****************************************************************************/
@@ -4015,14 +3980,10 @@
 
 /*****************************************************************************/
 
-long stli_init(long kmem_start)
+int stli_init(void)
 {
 	printk("%s: version %s\n", stli_drvname, stli_drvversion);
 
-#ifndef MODULE
-	stli_meminit(kmem_start);
-#endif
-
 	stli_brdinit();
 
 /*
@@ -4087,10 +4048,7 @@
 	if (tty_register_driver(&stli_callout))
 		printk("STALLION: failed to register callout driver\n");
 
-#ifndef MODULE
-	kmem_start = stli_memhalt();
-#endif
-	return(kmem_start);
+	return 0;
 }
 
 /*****************************************************************************/

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this