patch-2.2.0-pre4 linux/drivers/misc/parport_procfs.c

Next file: linux/drivers/net/ibmtr.c
Previous file: linux/drivers/misc/parport_pc.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.0-pre3/linux/drivers/misc/parport_procfs.c linux/drivers/misc/parport_procfs.c
@@ -27,6 +27,8 @@
 #include <asm/dma.h>
 #include <asm/irq.h>
 
+#ifdef CONFIG_PROC_FS
+
 struct proc_dir_entry *base = NULL;
 
 static int irq_write_proc(struct file *file, const char *buffer,
@@ -305,12 +307,11 @@
 {
 	base = new_proc_entry("parport", S_IFDIR, &proc_root,PROC_PARPORT,
 			      NULL);
-	base->fill_inode = &parport_modcount;
-
 	if (base == NULL) {
 		printk(KERN_ERR "Unable to initialise /proc/parport.\n");
 		return 0;
 	}
+	base->fill_inode = &parport_modcount;
 
 	return 1;
 }
@@ -385,3 +386,26 @@
 	destroy_proc_tree(pp);
 	return 0;
 }
+
+#else
+
+int parport_proc_register(struct parport *p) 
+{
+	return 0;
+}
+
+int parport_proc_unregister(struct parport *p)
+{
+	return 0;
+}
+
+int parport_proc_init(void)
+{
+	return 0;
+}
+
+void parport_proc_cleanup(void)
+{
+}
+
+#endif

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