summaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/devio.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-09-03 17:11:07 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-09-03 17:11:07 +0200
commitc5c0283a9db1c7ba5881f956a1faf2ebc3dfe70e (patch)
treea4d44768f1591f40374c87eea9a28df8faccc103 /drivers/usb/core/devio.c
parenta31f01777bc54a0a9d57628956d05f8d454d3418 (diff)
parent36f3313d6bff91ab2a9e47698c27d15363640a4e (diff)
downloadlinux-c5c0283a9db1c7ba5881f956a1faf2ebc3dfe70e.tar.bz2
Merge generic_lookup_helpers into usb-next
The lookup helpers are needed here. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/core/devio.c')
-rw-r--r--drivers/usb/core/devio.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index 63f23f567680..3f899552f6e3 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -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);