Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fb28d58b authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

USB: remove CONFIG_USB_DEVICEFS



This option has been deprecated for many years now, and no userspace
tools use it anymore, so it should be safe to finally remove it.

Reported-by: default avatarKay Sievers <kay@vrfy.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 70f3c758
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -87,7 +87,6 @@ kernel as built-in or modules:
	CONFIG_SOUND             - Sound card support
	CONFIG_SOUND             - Sound card support
	CONFIG_SND               - Advanced Linux Sound Architecture
	CONFIG_SND               - Advanced Linux Sound Architecture
	CONFIG_USB               - Support for Host-side USB
	CONFIG_USB               - Support for Host-side USB
	CONFIG_USB_DEVICEFS      - USB device filesystem
	CONFIG_USB_EHCI_HCD      - EHCI HCD (USB 2.0) support
	CONFIG_USB_EHCI_HCD      - EHCI HCD (USB 2.0) support


Additionally, to use the example application, the following options need to
Additionally, to use the example application, the following options need to
+0 −29
Original line number Original line Diff line number Diff line
@@ -27,35 +27,6 @@ config USB_ANNOUNCE_NEW_DEVICES
comment "Miscellaneous USB options"
comment "Miscellaneous USB options"
	depends on USB
	depends on USB


config USB_DEVICEFS
	bool "USB device filesystem (DEPRECATED)"
	depends on USB
	---help---
	  If you say Y here (and to "/proc file system support" in the "File
	  systems" section, above), you will get a file /proc/bus/usb/devices
	  which lists the devices currently connected to your USB bus or
	  busses, and for every connected device a file named
	  "/proc/bus/usb/xxx/yyy", where xxx is the bus number and yyy the
	  device number; the latter files can be used by user space programs
	  to talk directly to the device. These files are "virtual", meaning
	  they are generated on the fly and not stored on the hard drive.

	  You may need to mount the usbfs file system to see the files, use
	  mount -t usbfs none /proc/bus/usb

	  For the format of the various /proc/bus/usb/ files, please read
	  <file:Documentation/usb/proc_usb_info.txt>.

	  Modern Linux systems do not use this.

	  Usbfs entries are files and not character devices; usbfs can't
	  handle Access Control Lists (ACL) which are the default way to
	  grant access to USB devices for untrusted users of a desktop
	  system.

	  The usbfs functionality is replaced by real device-nodes managed by
	  udev.  These nodes lived in /dev/bus/usb and are used by libusb.

config USB_DEVICE_CLASS
config USB_DEVICE_CLASS
	bool "USB device class-devices (DEPRECATED)"
	bool "USB device class-devices (DEPRECATED)"
	depends on USB
	depends on USB
+0 −1
Original line number Original line Diff line number Diff line
@@ -9,6 +9,5 @@ usbcore-y += config.o file.o buffer.o sysfs.o endpoint.o
usbcore-y += devio.o notify.o generic.o quirks.o devices.o
usbcore-y += devio.o notify.o generic.o quirks.o devices.o


usbcore-$(CONFIG_PCI)		+= hcd-pci.o
usbcore-$(CONFIG_PCI)		+= hcd-pci.o
usbcore-$(CONFIG_USB_DEVICEFS)	+= inode.o


obj-$(CONFIG_USB)		+= usbcore.o
obj-$(CONFIG_USB)		+= usbcore.o
+0 −11
Original line number Original line Diff line number Diff line
@@ -727,17 +727,6 @@ static int usbdev_open(struct inode *inode, struct file *file)
	if (imajor(inode) == USB_DEVICE_MAJOR)
	if (imajor(inode) == USB_DEVICE_MAJOR)
		dev = usbdev_lookup_by_devt(inode->i_rdev);
		dev = usbdev_lookup_by_devt(inode->i_rdev);


#ifdef CONFIG_USB_DEVICEFS
	/* procfs file */
	if (!dev) {
		dev = inode->i_private;
		if (dev && dev->usbfs_dentry &&
					dev->usbfs_dentry->d_inode == inode)
			usb_get_dev(dev);
		else
			dev = NULL;
	}
#endif
	mutex_unlock(&usbfs_mutex);
	mutex_unlock(&usbfs_mutex);


	if (!dev)
	if (!dev)
+2 −19
Original line number Original line Diff line number Diff line
@@ -726,16 +726,6 @@ static int usb_uevent(struct device *dev, struct kobj_uevent_env *env)
		return -ENODEV;
		return -ENODEV;
	}
	}


#ifdef	CONFIG_USB_DEVICEFS
	/* If this is available, userspace programs can directly read
	 * all the device descriptors we don't tell them about.  Or
	 * act as usermode drivers.
	 */
	if (add_uevent_var(env, "DEVICE=/proc/bus/usb/%03d/%03d",
			   usb_dev->bus->busnum, usb_dev->devnum))
		return -ENOMEM;
#endif

	/* per-device configurations are common */
	/* per-device configurations are common */
	if (add_uevent_var(env, "PRODUCT=%x/%x/%x",
	if (add_uevent_var(env, "PRODUCT=%x/%x/%x",
			   le16_to_cpu(usb_dev->descriptor.idVendor),
			   le16_to_cpu(usb_dev->descriptor.idVendor),
@@ -788,15 +778,13 @@ int usb_register_device_driver(struct usb_device_driver *new_udriver,


	retval = driver_register(&new_udriver->drvwrap.driver);
	retval = driver_register(&new_udriver->drvwrap.driver);


	if (!retval) {
	if (!retval)
		pr_info("%s: registered new device driver %s\n",
		pr_info("%s: registered new device driver %s\n",
			usbcore_name, new_udriver->name);
			usbcore_name, new_udriver->name);
		usbfs_update_special();
	else
	} else {
		printk(KERN_ERR "%s: error %d registering device "
		printk(KERN_ERR "%s: error %d registering device "
			"	driver %s\n",
			"	driver %s\n",
			usbcore_name, retval, new_udriver->name);
			usbcore_name, retval, new_udriver->name);
	}


	return retval;
	return retval;
}
}
@@ -815,7 +803,6 @@ void usb_deregister_device_driver(struct usb_device_driver *udriver)
			usbcore_name, udriver->name);
			usbcore_name, udriver->name);


	driver_unregister(&udriver->drvwrap.driver);
	driver_unregister(&udriver->drvwrap.driver);
	usbfs_update_special();
}
}
EXPORT_SYMBOL_GPL(usb_deregister_device_driver);
EXPORT_SYMBOL_GPL(usb_deregister_device_driver);


@@ -856,8 +843,6 @@ int usb_register_driver(struct usb_driver *new_driver, struct module *owner,
	if (retval)
	if (retval)
		goto out;
		goto out;


	usbfs_update_special();

	retval = usb_create_newid_files(new_driver);
	retval = usb_create_newid_files(new_driver);
	if (retval)
	if (retval)
		goto out_newid;
		goto out_newid;
@@ -897,8 +882,6 @@ void usb_deregister(struct usb_driver *driver)
	usb_remove_newid_files(driver);
	usb_remove_newid_files(driver);
	driver_unregister(&driver->drvwrap.driver);
	driver_unregister(&driver->drvwrap.driver);
	usb_free_dynids(driver);
	usb_free_dynids(driver);

	usbfs_update_special();
}
}
EXPORT_SYMBOL_GPL(usb_deregister);
EXPORT_SYMBOL_GPL(usb_deregister);


Loading