Message ID | 1559577023-558-20-git-send-email-suzuki.poulose@arm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | None | expand |
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index fa783531..28358a3 100644 --- a/drivers/usb/core/devio.c +++ b/drivers/usb/core/devio.c @@ -947,17 +947,11 @@ static int parse_usbdevfs_streams(struct usb_dev_state *ps, return ret; } -static int match_devt(struct device *dev, void *data) -{ - return dev->devt == (dev_t) (unsigned long) 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, NULL, devt); if (!dev) return NULL; return to_usb_device(dev);
Switch to using the bus_find_device_by_devt helper Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Oliver Neukum <oneukum@suse.com> Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Cc: linux-usb@vger.kernel.org Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> --- drivers/usb/core/devio.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)