ChangeSet 1.1119.1.12, 2003/08/06 16:02:14-07:00, sojka@planetarium.cz [PATCH] USB: fixes for usb-skeleton.c I've found minor errors in usb-skeleton.c. First, there is no valid value of interface->minor in assignment to dev->minor. Second, when calling usb_deregister_dev the interface->minor must be valid or else minor isn't deregistered. drivers/usb/usb-skeleton.c | 5 +---- 1 files changed, 1 insertion(+), 4 deletions(-) diff -Nru a/drivers/usb/usb-skeleton.c b/drivers/usb/usb-skeleton.c --- a/drivers/usb/usb-skeleton.c Fri Aug 8 17:04:58 2003 +++ b/drivers/usb/usb-skeleton.c Fri Aug 8 17:04:58 2003 @@ -526,7 +526,6 @@ init_MUTEX (&dev->sem); dev->udev = udev; dev->interface = interface; - dev->minor = interface->minor; /* set up the endpoint information */ /* check out the endpoints */ @@ -606,6 +605,7 @@ goto error; } + dev->minor = interface->minor; /* let the user know what node this device is now attached to */ info ("USB Skeleton device now attached to USBSkel-%d", dev->minor); @@ -640,9 +640,6 @@ usb_set_intfdata (interface, NULL); down (&dev->sem); - - /* disable open() */ - interface->minor = -1; minor = dev->minor;