multiple interface test case

Duncan Sands baldrick at free.fr
Tue Apr 12 10:38:00 EDT 2005


Hi Roman,

> I've dug a 3-interface webcam out of the depths of garbage in my office,
> and already managed to get rmmod testusb hang on it :)  so I may be able
> to be a bit more useful now...

great!  I'm at work right now, which means I have to hide from my boss
when I do this stuff :)  I think you should use this in your test
module:

void test_usb_disconnect(struct usb_interface *intf)
{
        struct usb_device *usb_dev = interface_to_usbdev(intf);
        int num_interfaces = usb_dev->actconfig->desc.bNumInterfaces;

        dbg("%s entered", __func__);

        if (usb_get_intfdata(intf))
                release_interfaces(usb_dev, num_interfaces);
        else
                dbg("NULL instance");
}





More information about the Usbatm mailing list