diff options
| author | Ming Lei <tom.leiming@gmail.com> | 2010-05-17 10:20:50 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-20 16:21:47 -0400 |
| commit | c024b7260c8f879a2ef3a3e6a853b579a46479f8 (patch) | |
| tree | 339346367d1558d61956c965c51d0733dbe10616 /drivers/usb | |
| parent | 0858a3a52f659dabf2860f350e5a6a61f069e851 (diff) | |
USB: remove match_device
usb_find_device was the only one user of match_device, now
it is removed, so remove match_device to fix the compile warning
below reported by Stephen Rothwell:
drivers/usb/core/usb.c:596: warning: 'match_device'
defined but not used
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
| -rw-r--r-- | drivers/usb/core/usb.c | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c index 902f821d8d14..397b678f1c47 100644 --- a/drivers/usb/core/usb.c +++ b/drivers/usb/core/usb.c | |||
| @@ -593,39 +593,6 @@ int usb_lock_device_for_reset(struct usb_device *udev, | |||
| 593 | } | 593 | } |
| 594 | EXPORT_SYMBOL_GPL(usb_lock_device_for_reset); | 594 | EXPORT_SYMBOL_GPL(usb_lock_device_for_reset); |
| 595 | 595 | ||
| 596 | static struct usb_device *match_device(struct usb_device *dev, | ||
| 597 | u16 vendor_id, u16 product_id) | ||
| 598 | { | ||
| 599 | struct usb_device *ret_dev = NULL; | ||
| 600 | int child; | ||
| 601 | |||
| 602 | dev_dbg(&dev->dev, "check for vendor %04x, product %04x ...\n", | ||
| 603 | le16_to_cpu(dev->descriptor.idVendor), | ||
| 604 | le16_to_cpu(dev->descriptor.idProduct)); | ||
| 605 | |||
| 606 | /* see if this device matches */ | ||
| 607 | if ((vendor_id == le16_to_cpu(dev->descriptor.idVendor)) && | ||
| 608 | (product_id == le16_to_cpu(dev->descriptor.idProduct))) { | ||
| 609 | dev_dbg(&dev->dev, "matched this device!\n"); | ||
| 610 | ret_dev = usb_get_dev(dev); | ||
| 611 | goto exit; | ||
| 612 | } | ||
| 613 | |||
| 614 | /* look through all of the children of this device */ | ||
| 615 | for (child = 0; child < dev->maxchild; ++child) { | ||
| 616 | if (dev->children[child]) { | ||
| 617 | usb_lock_device(dev->children[child]); | ||
| 618 | ret_dev = match_device(dev->children[child], | ||
| 619 | vendor_id, product_id); | ||
| 620 | usb_unlock_device(dev->children[child]); | ||
| 621 | if (ret_dev) | ||
| 622 | goto exit; | ||
| 623 | } | ||
| 624 | } | ||
| 625 | exit: | ||
| 626 | return ret_dev; | ||
| 627 | } | ||
| 628 | |||
| 629 | /** | 596 | /** |
| 630 | * usb_get_current_frame_number - return current bus frame number | 597 | * usb_get_current_frame_number - return current bus frame number |
| 631 | * @dev: the device whose bus is being queried | 598 | * @dev: the device whose bus is being queried |
