aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/core/devio.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index 5580c6e59bae..54a350ccd033 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -552,14 +552,15 @@ static int check_ctrlrecip(struct dev_state *ps, unsigned int requesttype,
552 552
553static int match_devt(struct device *dev, void *data) 553static int match_devt(struct device *dev, void *data)
554{ 554{
555 return (dev->devt == (dev_t) data); 555 return dev->devt == (dev_t) (unsigned long) data;
556} 556}
557 557
558static struct usb_device *usbdev_lookup_by_devt(dev_t devt) 558static struct usb_device *usbdev_lookup_by_devt(dev_t devt)
559{ 559{
560 struct device *dev; 560 struct device *dev;
561 561
562 dev = bus_find_device(&usb_bus_type, NULL, (void *) devt, match_devt); 562 dev = bus_find_device(&usb_bus_type, NULL,
563 (void *) (unsigned long) devt, match_devt);
563 if (!dev) 564 if (!dev)
564 return NULL; 565 return NULL;
565 return container_of(dev, struct usb_device, dev); 566 return container_of(dev, struct usb_device, dev);