[PATCH] usb: class driver pass dev_t to the class core

From: Greg KH
Date: Wed Mar 09 2005 - 20:01:06 EST


ChangeSet 1.2042, 2005/03/09 09:51:30-08:00, kay.sievers@xxxxxxxx

[PATCH] usb: class driver pass dev_t to the class core

Signed-off-by: Kay Sievers <kay.sievers@xxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>


drivers/usb/core/file.c | 9 +--------
1 files changed, 1 insertion(+), 8 deletions(-)


diff -Nru a/drivers/usb/core/file.c b/drivers/usb/core/file.c
--- a/drivers/usb/core/file.c 2005-03-09 16:29:34 -08:00
+++ b/drivers/usb/core/file.c 2005-03-09 16:29:34 -08:00
@@ -107,13 +107,6 @@
unregister_chrdev(USB_MAJOR, "usb");
}

-static ssize_t show_dev(struct class_device *class_dev, char *buf)
-{
- 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);
-
/**
* usb_register_dev - register a USB device, and ask for a minor number
* @intf: pointer to the usb_interface that is being registered
@@ -184,6 +177,7 @@
class_dev = kmalloc(sizeof(*class_dev), GFP_KERNEL);
if (class_dev) {
memset(class_dev, 0x00, sizeof(struct class_device));
+ class_dev->devt = MKDEV(USB_MAJOR, minor);
class_dev->class = &usb_class;
class_dev->dev = &intf->dev;

@@ -195,7 +189,6 @@
snprintf(class_dev->class_id, BUS_ID_SIZE, "%s", temp);
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;
}
exit:

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/