patch-2.1.18 linux/drivers/char/misc.c

Next file: linux/drivers/char/pcwd.c
Previous file: linux/drivers/char/mem.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.17/linux/drivers/char/misc.c linux/drivers/char/misc.c
@@ -175,17 +175,13 @@
 
 #endif
 
-static struct symbol_table misc_syms = {
 /* Should this be surrounded with "#ifdef CONFIG_MODULES" ? */
-#include <linux/symtab_begin.h>
-	X(misc_register),
-	X(misc_deregister),
+EXPORT_SYMBOL(misc_register);
+EXPORT_SYMBOL(misc_deregister);
 #ifndef MODULE
-	X(set_selection),   /* used by the kmouse module, can only */
-	X(paste_selection), /* be exported if misc.c is in linked in */
+EXPORT_SYMBOL(set_selection);   /* used by the kmouse module, can only */
+EXPORT_SYMBOL(paste_selection); /* be exported if misc.c is in linked in */
 #endif
-#include <linux/symtab_end.h>
-};
 
 #if defined(CONFIG_PROC_FS) && !defined(MODULE)
 static struct proc_dir_entry proc_misc = {
@@ -240,15 +236,10 @@
 #endif
 #endif /* !MODULE */
 	if (register_chrdev(MISC_MAJOR,"misc",&misc_fops)) {
-	  printk("unable to get major %d for misc devices\n",
-		 MISC_MAJOR);
+		printk("unable to get major %d for misc devices\n",
+		       MISC_MAJOR);
 		return -EIO;
 	}
 
-	if(register_symtab(&misc_syms)!=0)
-	{
-		unregister_chrdev(MISC_MAJOR, "misc");
-		return -EIO;
-	}
 	return 0;
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov