aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMing Lei <tom.leiming@gmail.com>2010-05-12 11:38:46 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-05-20 16:21:45 -0400
commit22b4b6113ec5d0ff2a9175bc611f3f3f61e4e172 (patch)
tree5226f05128912ed10db3a334864d07170be1955b
parentb9e000884e50bf6b25a92a3f3580e1d14fe01591 (diff)
USB: remove usb_find_device
Now on one uses this function and it seems useless, so remove usb_find_device. [tom@tom linux-2.6-next]$ grep -r -n -I usb_find_device ./ drivers/media/dvb/dvb-usb/dvb-usb-init.c:160:static struct dvb_usb_device_description * dvb_usb_find_device(struct usb_device *udev,struct dvb_usb_device_properties *props, int *cold) drivers/media/dvb/dvb-usb/dvb-usb-init.c:230: if ((desc = dvb_usb_find_device(udev,props,&cold)) == NULL) { drivers/usb/core/usb.c:630: * usb_find_device - find a specific usb device in the system drivers/usb/core/usb.c:642:struct usb_device *usb_find_device(u16 vendor_id, u16 product_id) Signed-off-by: Ming Lei <tom.leiming@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/usb/core/usb.c37
-rw-r--r--include/linux/usb.h1
2 files changed, 0 insertions, 38 deletions
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
index 8180ce533ebf..902f821d8d14 100644
--- a/drivers/usb/core/usb.c
+++ b/drivers/usb/core/usb.c
@@ -627,43 +627,6 @@ exit:
627} 627}
628 628
629/** 629/**
630 * usb_find_device - find a specific usb device in the system
631 * @vendor_id: the vendor id of the device to find
632 * @product_id: the product id of the device to find
633 *
634 * Returns a pointer to a struct usb_device if such a specified usb
635 * device is present in the system currently. The usage count of the
636 * device will be incremented if a device is found. Make sure to call
637 * usb_put_dev() when the caller is finished with the device.
638 *
639 * If a device with the specified vendor and product id is not found,
640 * NULL is returned.
641 */
642struct usb_device *usb_find_device(u16 vendor_id, u16 product_id)
643{
644 struct list_head *buslist;
645 struct usb_bus *bus;
646 struct usb_device *dev = NULL;
647
648 mutex_lock(&usb_bus_list_lock);
649 for (buslist = usb_bus_list.next;
650 buslist != &usb_bus_list;
651 buslist = buslist->next) {
652 bus = container_of(buslist, struct usb_bus, bus_list);
653 if (!bus->root_hub)
654 continue;
655 usb_lock_device(bus->root_hub);
656 dev = match_device(bus->root_hub, vendor_id, product_id);
657 usb_unlock_device(bus->root_hub);
658 if (dev)
659 goto exit;
660 }
661exit:
662 mutex_unlock(&usb_bus_list_lock);
663 return dev;
664}
665
666/**
667 * usb_get_current_frame_number - return current bus frame number 630 * usb_get_current_frame_number - return current bus frame number
668 * @dev: the device whose bus is being queried 631 * @dev: the device whose bus is being queried
669 * 632 *
diff --git a/include/linux/usb.h b/include/linux/usb.h
index ce07062ebc28..3185eb46d85a 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -510,7 +510,6 @@ extern int usb_lock_device_for_reset(struct usb_device *udev,
510extern int usb_reset_device(struct usb_device *dev); 510extern int usb_reset_device(struct usb_device *dev);
511extern void usb_queue_reset_device(struct usb_interface *dev); 511extern void usb_queue_reset_device(struct usb_interface *dev);
512 512
513extern struct usb_device *usb_find_device(u16 vendor_id, u16 product_id);
514 513
515/* USB autosuspend and autoresume */ 514/* USB autosuspend and autoresume */
516#ifdef CONFIG_USB_SUSPEND 515#ifdef CONFIG_USB_SUSPEND