From: Greg KH <greg@kroah.com>
To: marcelo@conectiva.com.br
Cc: linux-usb-devel@lists.sourceforge.net
Subject: [PATCH 3 of 8] USB usbfs name added

Hi,

Here's a patch against 2.4.19-pre3 for the USB file system that allows
people to mount it as 'usbfs' as well as the old 'usbdevfs' name.  This
is due to the 'usbdevfs' name being phased out over time due to people
mistaking it with devfs.

thanks,

greg k-h



diff -Nru a/drivers/usb/inode.c b/drivers/usb/inode.c
--- a/drivers/usb/inode.c	Wed Mar 13 10:29:08 2002
+++ b/drivers/usb/inode.c	Wed Mar 13 10:29:08 2002
@@ -654,7 +654,13 @@
         return NULL;
 }
 
+/*
+ * The usbdevfs name is now deprecated (as of 2.4.19).
+ * It will be removed when the 2.7.x development cycle is started.
+ * You have been warned :)
+ */
 static DECLARE_FSTYPE(usbdevice_fs_type, "usbdevfs", usbdevfs_read_super, FS_SINGLE);
+static DECLARE_FSTYPE(usbfs_type, "usbfs", usbdevfs_read_super, FS_SINGLE);
 
 /* --------------------------------------------------------------------- */
 
@@ -751,6 +757,11 @@
 		usb_deregister(&usbdevfs_driver);
 		return ret;
 	}
+	if ((ret = register_filesystem(&usbfs_type))) {
+		usb_deregister(&usbdevfs_driver);
+		unregister_filesystem(&usbdevice_fs_type);
+		return ret;
+	}
 #ifdef CONFIG_PROC_FS		
 	/* create mount point for usbdevfs */
 	usbdir = proc_mkdir("usb", proc_bus);
@@ -762,6 +773,7 @@
 {
 	usb_deregister(&usbdevfs_driver);
 	unregister_filesystem(&usbdevice_fs_type);
+	unregister_filesystem(&usbfs_type);
 #ifdef CONFIG_PROC_FS	
         if (usbdir)
                 remove_proc_entry("usb", proc_bus);

