]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/usb/core/devio.c
USB: Fix pointer/int cast in USB devio code
[linux-2.6-omap-h63xx.git] / drivers / usb / core / devio.c
index 5580c6e59baefff99fc8553476e5b17f27f6b399..54a350ccd0333870fc4a7c01371f2dd1e7042d78 100644 (file)
@@ -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);