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

Commit 90eb29ef authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6: (24 commits)
  Revert "[PATCH] USB: move usb_device_class class devices to be real devices"
  Revert "[PATCH] USB: convert usb class devices to real devices"
  USB: UHCI: Don't test the Short Packet Detect bit
  USB: unusual_devs entry for Nokia 3250
  USB: dummy-hcd: disable interrupts during req->complete
  USB: fix the USB_GADGET_DUMMY_HCD dependencies
  USB: ati_remote.c: autorepeat fix
  USB: doc: fixes devio.c location in proc_usb_info.txt.
  USB: doc: usb-help.txt update.
  USB: Patch for rtl8150 to fix unplug problems
  USB: cypress driver comment updates
  USB: unusual_devs device removal
  usb-storage: Add US_FL_IGNORE_DEVICE flag; ignore ZyXEL G220F
  USB: New USB ID for Belkin Serial Adapter
  USB: Additional PID for the ftdi_sio driver
  USB: adding support for SHARP WS003SH to ipaq.c
  USB: Fix Freescale high-speed USB host dependency
  USB: Removed 3-port device handler from Option driver
  USB: Drop Sierra Wireless MC8755 from the Option driver
  USB: Let option driver handle Anydata CDMA modems. Remove anydata driver.
  ...
parents 1398ab7c cae74b30
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@ bind to an interface (or perhaps several) using an ioctl call. You
would issue more ioctls to the device to communicate to it using
control, bulk, or other kinds of USB transfers.  The IOCTLs are
listed in the <linux/usbdevice_fs.h> file, and at this writing the
source code (linux/drivers/usb/devio.c) is the primary reference
source code (linux/drivers/usb/core/devio.c) is the primary reference
for how to access devices through those files.

Note that since by default these BBB/DDD files are writable only by
+1 −2
Original line number Diff line number Diff line
@@ -5,8 +5,7 @@ For USB help other than the readme files that are located in
Documentation/usb/*, see the following:

Linux-USB project:  http://www.linux-usb.org
  mirrors at        http://www.suse.cz/development/linux-usb/
         and        http://usb.in.tum.de/linux-usb/
  mirrors at        http://usb.in.tum.de/linux-usb/
         and        http://it.linux-usb.org
Linux USB Guide:    http://linux-usb.sourceforge.net
Linux-USB device overview (working devices and drivers):
+1 −1
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ config USB_ARCH_HAS_OHCI
	default y if ARCH_S3C2410
	default y if PXA27x
	default y if ARCH_EP93XX
	default y if ARCH_AT91RM9200
	default y if (ARCH_AT91RM9200 || ARCH_AT91SAM9261)
	# PPC:
	default y if STB03xxx
	default y if PPC_MPC52xx
+10 −10
Original line number Diff line number Diff line
@@ -517,19 +517,19 @@ static int check_ctrlrecip(struct dev_state *ps, unsigned int requesttype, unsig

static struct usb_device *usbdev_lookup_minor(int minor)
{
	struct device *device;
	struct usb_device *udev = NULL;
	struct class_device *class_dev;
	struct usb_device *dev = NULL;

	down(&usb_device_class->sem);
	list_for_each_entry(device, &usb_device_class->devices, node) {
		if (device->devt == MKDEV(USB_DEVICE_MAJOR, minor)) {
			udev = device->platform_data;
	list_for_each_entry(class_dev, &usb_device_class->children, node) {
		if (class_dev->devt == MKDEV(USB_DEVICE_MAJOR, minor)) {
			dev = class_dev->class_data;
			break;
		}
	}
	up(&usb_device_class->sem);

	return udev;
	return dev;
};

/*
@@ -1580,16 +1580,16 @@ static void usbdev_add(struct usb_device *dev)
{
	int minor = ((dev->bus->busnum-1) * 128) + (dev->devnum-1);

	dev->usbfs_dev = device_create(usb_device_class, &dev->dev,
				MKDEV(USB_DEVICE_MAJOR, minor),
	dev->class_dev = class_device_create(usb_device_class, NULL,
				MKDEV(USB_DEVICE_MAJOR, minor), &dev->dev,
				"usbdev%d.%d", dev->bus->busnum, dev->devnum);

	dev->usbfs_dev->platform_data = dev;
	dev->class_dev->class_data = dev;
}

static void usbdev_remove(struct usb_device *dev)
{
	device_unregister(dev->usbfs_dev);
	class_device_unregister(dev->class_dev);
}

static int usbdev_notify(struct notifier_block *self, unsigned long action,
+7 −6
Original line number Diff line number Diff line
@@ -194,13 +194,14 @@ int usb_register_dev(struct usb_interface *intf,
		++temp;
	else
		temp = name;
	intf->usb_dev = device_create(usb_class->class, &intf->dev,
				      MKDEV(USB_MAJOR, minor), "%s", temp);
	if (IS_ERR(intf->usb_dev)) {
	intf->class_dev = class_device_create(usb_class->class, NULL,
					      MKDEV(USB_MAJOR, minor),
					      &intf->dev, "%s", temp);
	if (IS_ERR(intf->class_dev)) {
		spin_lock (&minor_lock);
		usb_minors[intf->minor] = NULL;
		spin_unlock (&minor_lock);
		retval = PTR_ERR(intf->usb_dev);
		retval = PTR_ERR(intf->class_dev);
	}
exit:
	return retval;
@@ -241,8 +242,8 @@ void usb_deregister_dev(struct usb_interface *intf,
	spin_unlock (&minor_lock);

	snprintf(name, BUS_ID_SIZE, class_driver->name, intf->minor - minor_base);
	device_destroy(usb_class->class, MKDEV(USB_MAJOR, intf->minor));
	intf->usb_dev = NULL;
	class_device_destroy(usb_class->class, MKDEV(USB_MAJOR, intf->minor));
	intf->class_dev = NULL;
	intf->minor = -1;
	destroy_usb_class();
}
Loading