]> git.hungrycats.org Git - linux/commitdiff
[USB]: Fix encapsulation of int inside of pointer in code/file.c
authorDavid S. Miller <davem@nuts.ninka.net>
Wed, 8 Oct 2003 01:06:49 +0000 (18:06 -0700)
committerDavid S. Miller <davem@nuts.ninka.net>
Wed, 8 Oct 2003 01:06:49 +0000 (18:06 -0700)
drivers/usb/core/file.c

index fcf39a64411cfae5c18a109ba05829e6d71b9a3d..39fdceaf55df043389b3b071f4bbddc7792f4278 100644 (file)
@@ -98,7 +98,7 @@ void usb_major_cleanup(void)
 
 static ssize_t show_dev(struct class_device *class_dev, char *buf)
 {
-       int minor = (int)class_get_devdata(class_dev);
+       int minor = (int)(long)class_get_devdata(class_dev);
        return print_dev_t(buf, MKDEV(USB_MAJOR, minor));
 }
 static CLASS_DEVICE_ATTR(dev, S_IRUGO, show_dev, NULL);
@@ -182,7 +182,7 @@ int usb_register_dev(struct usb_interface *intf,
                else
                        temp = name;
                snprintf(class_dev->class_id, BUS_ID_SIZE, "%s", temp);
-               class_set_devdata(class_dev, (void *)intf->minor);
+               class_set_devdata(class_dev, (void *)(long)intf->minor);
                class_device_register(class_dev);
                class_device_create_file(class_dev, &class_device_attr_dev);
                intf->class_dev = class_dev;