|
@@ -359,11 +359,6 @@ static void destroy_async(struct dev_state *ps, struct list_head *list)
|
|
spin_lock_irqsave(&ps->lock, flags);
|
|
spin_lock_irqsave(&ps->lock, flags);
|
|
}
|
|
}
|
|
spin_unlock_irqrestore(&ps->lock, flags);
|
|
spin_unlock_irqrestore(&ps->lock, flags);
|
|
- as = async_getcompleted(ps);
|
|
|
|
- while (as) {
|
|
|
|
- free_async(as);
|
|
|
|
- as = async_getcompleted(ps);
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
|
|
|
|
static void destroy_async_on_interface(struct dev_state *ps,
|
|
static void destroy_async_on_interface(struct dev_state *ps,
|
|
@@ -643,6 +638,7 @@ static int usbdev_release(struct inode *inode, struct file *file)
|
|
struct dev_state *ps = file->private_data;
|
|
struct dev_state *ps = file->private_data;
|
|
struct usb_device *dev = ps->dev;
|
|
struct usb_device *dev = ps->dev;
|
|
unsigned int ifnum;
|
|
unsigned int ifnum;
|
|
|
|
+ struct async *as;
|
|
|
|
|
|
usb_lock_device(dev);
|
|
usb_lock_device(dev);
|
|
|
|
|
|
@@ -661,6 +657,12 @@ static int usbdev_release(struct inode *inode, struct file *file)
|
|
usb_unlock_device(dev);
|
|
usb_unlock_device(dev);
|
|
usb_put_dev(dev);
|
|
usb_put_dev(dev);
|
|
put_pid(ps->disc_pid);
|
|
put_pid(ps->disc_pid);
|
|
|
|
+
|
|
|
|
+ as = async_getcompleted(ps);
|
|
|
|
+ while (as) {
|
|
|
|
+ free_async(as);
|
|
|
|
+ as = async_getcompleted(ps);
|
|
|
|
+ }
|
|
kfree(ps);
|
|
kfree(ps);
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|