ChangeSet 1.1070, 2003/05/07 00:21:28-07:00, greg@kroah.com [PATCH] USB: converted dabusb over to new usb_register_dev() changes. drivers/usb/media/dabusb.c | 17 ++++++++++++----- drivers/usb/media/dabusb.h | 4 ---- 2 files changed, 12 insertions(+), 9 deletions(-) diff -Nru a/drivers/usb/media/dabusb.c b/drivers/usb/media/dabusb.c --- a/drivers/usb/media/dabusb.c Wed May 7 11:12:21 2003 +++ b/drivers/usb/media/dabusb.c Wed May 7 11:12:21 2003 @@ -712,12 +712,19 @@ .release = dabusb_release, }; +static struct usb_class_driver dabusb_class = { + .name = "usb/dabusb%d", + .fops = &dabusb_fops, + .mode = S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP, + .minor_base = DABUSB_MINOR, +}; + + /* --------------------------------------------------------------------- */ static int dabusb_probe (struct usb_interface *intf, const struct usb_device_id *id) { struct usb_device *usbdev = interface_to_usbdev(intf); - int devnum; int retval; pdabusb_t s; @@ -731,16 +738,16 @@ if (intf->altsetting->desc.bInterfaceNumber != _DABUSB_IF && usbdev->descriptor.idProduct == 0x9999) return -ENODEV; - retval = usb_register_dev (&dabusb_fops, DABUSB_MINOR, 1, &devnum); + retval = usb_register_dev(intf, &dabusb_class); if (retval) return -ENOMEM; - s = &dabusb[devnum]; + s = &dabusb[intf->minor]; down (&s->mutex); s->remove_pending = 0; s->usbdev = usbdev; - s->devnum = devnum; + s->devnum = intf->minor; if (usb_set_configuration (usbdev, usbdev->config[0].desc.bConfigurationValue) < 0) { err("set_configuration failed"); @@ -778,7 +785,7 @@ usb_set_intfdata (intf, NULL); if (s) { - usb_deregister_dev (1, s->devnum); + usb_deregister_dev (intf, &dabusb_class); s->remove_pending = 1; wake_up (&s->wait); if (s->state == _started) diff -Nru a/drivers/usb/media/dabusb.h b/drivers/usb/media/dabusb.h --- a/drivers/usb/media/dabusb.h Wed May 7 11:12:21 2003 +++ b/drivers/usb/media/dabusb.h Wed May 7 11:12:21 2003 @@ -6,11 +6,7 @@ unsigned int pipe; }bulk_transfer_t,*pbulk_transfer_t; -#ifdef CONFIG_USB_DYNAMIC_MINORS -#define DABUSB_MINOR 0 -#else #define DABUSB_MINOR 240 /* some unassigned USB minor */ -#endif #define DABUSB_VERSION 0x1000 #define IOCTL_DAB_BULK _IOWR('d', 0x30, bulk_transfer_t) #define IOCTL_DAB_OVERRUNS _IOR('d', 0x15, int)