patch-2.1.23 linux/drivers/sbus/char/openprom.c

Next file: linux/drivers/sbus/char/rtc.c
Previous file: linux/drivers/sbus/audio/cs4231.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.22/linux/drivers/sbus/char/openprom.c linux/drivers/sbus/char/openprom.c
@@ -558,23 +558,29 @@
 	NULL,			/* openprom_read */
 	NULL,			/* openprom_write */
 	NULL,			/* openprom_readdir */
-	NULL,			/* openprom_select */
+	NULL,			/* openprom_poll */
 	openprom_ioctl,
 	NULL,			/* openprom_mmap */
 	openprom_open,
 	openprom_release
 };
 
-static struct miscdevice misc_openprom = {
+static struct miscdevice openprom_dev = {
 	SUN_OPENPROM_MINOR, "openprom", &openprom_fops
 };
 
+EXPORT_NO_SYMBOLS;
+
+#ifdef MODULE
+int init_module(void)
+#else
 __initfunc(int openprom_init(void))
+#endif
 {
 	unsigned long flags;
 	int error;
 
-	error = misc_register(&misc_openprom);
+	error = misc_register(&openprom_dev);
 	if (error) {
 		printk(KERN_ERR "openprom: unable to get misc minor\n");
 		return error;
@@ -587,7 +593,7 @@
 
 	if (options_node == 0 || options_node == -1) {
 		printk(KERN_ERR "openprom: unable to find options node\n");
-		misc_deregister(&misc_openprom);
+		misc_deregister(&openprom_dev);
 		return -EIO;
 	}
 
@@ -596,15 +602,9 @@
 
 #ifdef MODULE
 
-int init_module(void)
-{
-	register_symtab(0);
-	return openprom_init();
-}
-
 void cleanup_module(void)
 {
-	misc_deregister(&misc_openprom);
+	misc_deregister(&openprom_dev);
 }
 
 #endif

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