Merge generic_lookup_helpers into usb-next
The lookup helpers are needed here. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
@@ -972,17 +972,11 @@ error:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int match_devt(struct device *dev, const void *data)
|
||||
{
|
||||
return dev->devt == (dev_t)(unsigned long)(void *)data;
|
||||
}
|
||||
|
||||
static struct usb_device *usbdev_lookup_by_devt(dev_t devt)
|
||||
{
|
||||
struct device *dev;
|
||||
|
||||
dev = bus_find_device(&usb_bus_type, NULL,
|
||||
(void *) (unsigned long) devt, match_devt);
|
||||
dev = bus_find_device_by_devt(&usb_bus_type, devt);
|
||||
if (!dev)
|
||||
return NULL;
|
||||
return to_usb_device(dev);
|
||||
|
Reference in New Issue
Block a user