Skip to content

Commit

Permalink
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6
Browse files Browse the repository at this point in the history
* 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.
  ...
  • Loading branch information
Linus Torvalds committed Aug 3, 2006
2 parents 1398ab7 + cae74b3 commit 90eb29e
Show file tree
Hide file tree
Showing 29 changed files with 343 additions and 364 deletions.
2 changes: 1 addition & 1 deletion Documentation/usb/proc_usb_info.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions Documentation/usb/usb-help.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 10 additions & 10 deletions drivers/usb/core/devio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

/*
Expand Down Expand Up @@ -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,
Expand Down
13 changes: 7 additions & 6 deletions drivers/usb/core/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/gadget/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ config USB_AT91

config USB_GADGET_DUMMY_HCD
boolean "Dummy HCD (DEVELOPMENT)"
depends on USB && EXPERIMENTAL
depends on (USB=y || (USB=m && USB_GADGET=m)) && EXPERIMENTAL
select USB_GADGET_DUALSPEED
help
This host controller driver emulates USB, looping all data transfer
Expand Down
Loading

0 comments on commit 90eb29e

Please sign in to comment.