patch-1.3.58 linux/drivers/net/slhc.c

Next file: linux/drivers/pci/pci.c
Previous file: linux/drivers/net/seeq8005.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.57/linux/drivers/net/slhc.c linux/drivers/net/slhc.c
@@ -90,6 +90,8 @@
 static long decode(unsigned char **cpp);
 static unsigned char * put16(unsigned char *cp, unsigned short x);
 static unsigned short pull16(unsigned char **cpp);
+static void export_slhc_syms(void);
+static has_exported = 0;
 
 /* Initialize compression data structure
  *	slots must be in range 0 to 255 (zero meaning no compression)
@@ -101,6 +103,9 @@
 	register struct cstate *ts;
 	struct slcompress *comp;
 
+	if (!has_exported)
+		export_slhc_syms();
+
 	comp = (struct slcompress *)kmalloc(sizeof(struct slcompress),
 					    GFP_KERNEL);
 	if (! comp)
@@ -727,11 +732,31 @@
 	}
 }
 
+static struct symbol_table slhc_syms = {
+/* Should this be surrounded with "#ifdef CONFIG_MODULES" ? */
+#include <linux/symtab_begin.h>
+        /* VJ header compression */
+        X(slhc_init),
+        X(slhc_free),
+        X(slhc_remember),
+        X(slhc_compress),
+        X(slhc_uncompress),
+        X(slhc_toss),
+#include <linux/symtab_end.h>
+};
+
+static void export_slhc_syms(void)
+{
+	register_symtab(&slhc_syms);
+	has_exported = 1;
+}
+
 #ifdef MODULE
 
 int init_module(void)
 {
 	printk("CSLIP: code copyright 1989 Regents of the University of California\n");
+	export_slhc_syms();
 	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