public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 4/7] usb: class driver pass dev_t to the class core
@ 2005-01-23  4:24 Kay Sievers
  0 siblings, 0 replies; only message in thread
From: Kay Sievers @ 2005-01-23  4:24 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg KH

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>

===== drivers/usb/core/file.c 1.17 vs edited =====
--- 1.17/drivers/usb/core/file.c	2005-01-15 01:01:44 +01:00
+++ edited/drivers/usb/core/file.c	2005-01-22 15:15:05 +01:00
@@ -107,13 +107,6 @@ void usb_major_cleanup(void)
 	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 @@ int usb_register_dev(struct usb_interfac
 	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 @@ int usb_register_dev(struct usb_interfac
 		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:


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-01-23  4:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-23  4:24 [PATCH 4/7] usb: class driver pass dev_t to the class core Kay Sievers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox