sound/usbsoundbasedevice: Unregister device removed handler
The device removed handler for the underlying USB audio streaming device must be unregistered, when the class CUSBSoundBaseDevice is destroyed. Otherwise it may be called with an invalid this-pointer, when the streaming device is removed, which led to a system crash. The device remove handling for the underlying streaming device has been simplified. There is only one registration of the removed handler any more. The removed handler waits for all USB data transfers to complete and the sound device going idle now. Before, multiple instances of CUSBSoundBaseDevice tried to register the same device name "sndusb", which failed from the second instance on, because the name was already in use. Now the second instance gets the name "sndusb1" and so on.
R
Rene Stange committed
643594bfb9b4f080ddee2ddc8bb60449f12dc0d6
Parent: c1a5948