@@ -151,7 +151,6 @@ struct dsbr100_device {
struct mutex lock; /* buffer locking */
int curfreq;
int stereo;
- int removed;
int status;
};
@@ -353,7 +352,7 @@ static void usb_dsbr100_disconnect(struct usb_interface *intf)
usb_set_intfdata (intf, NULL);
mutex_lock(&radio->lock);
- radio->removed = 1;
+ radio->usbdev = NULL;
mutex_unlock(&radio->lock);
v4l2_device_disconnect(&radio->v4l2_dev);
@@ -521,7 +520,7 @@ static long usb_dsbr100_ioctl(struct file *file, unsigned int cmd,
mutex_lock(&radio->lock);
- if (radio->removed) {
+ if (!radio->usbdev) {
retval = -EIO;
goto unlock;
}
@@ -649,7 +648,6 @@ static int usb_dsbr100_probe(struct usb_interface *intf,
mutex_init(&radio->lock);
- radio->removed = 0;
radio->usbdev = interface_to_usbdev(intf);
radio->curfreq = FREQ_MIN * FREQ_MUL;
radio->status = STOPPED;