diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index 5580c6e59baefff99fc8553476e5b17f27f6b399..54a350ccd0333870fc4a7c01371f2dd1e7042d78 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,
 
 static int match_devt(struct device *dev, void *data)
 {
-	return (dev->devt == (dev_t) 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 *) devt, match_devt);
+	dev = bus_find_device(&usb_bus_type, NULL,
+			      (void *) (unsigned long) devt, match_devt);
 	if (!dev)
 		return NULL;
 	return container_of(dev, struct usb_device, dev);