Commit 6f094eb9 authored by Alexey Klimov's avatar Alexey Klimov Committed by Mauro Carvalho Chehab

V4L/DVB (11954): dsbr100: remove radio->users counter

Patch removes radio->users counter because it is not in use.
Signed-off-by: default avatarAlexey Klimov <klimov.linux@gmail.com>
Signed-off-by: default avatarDouglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 92051b28
...@@ -145,7 +145,6 @@ struct dsbr100_device { ...@@ -145,7 +145,6 @@ struct dsbr100_device {
struct mutex lock; /* buffer locking */ struct mutex lock; /* buffer locking */
int curfreq; int curfreq;
int stereo; int stereo;
int users;
int removed; int removed;
int muted; int muted;
}; };
...@@ -549,14 +548,12 @@ static int usb_dsbr100_open(struct file *file) ...@@ -549,14 +548,12 @@ static int usb_dsbr100_open(struct file *file)
int retval; int retval;
lock_kernel(); lock_kernel();
radio->users = 1;
radio->muted = 1; radio->muted = 1;
retval = dsbr100_start(radio); retval = dsbr100_start(radio);
if (retval < 0) { if (retval < 0) {
dev_warn(&radio->usbdev->dev, dev_warn(&radio->usbdev->dev,
"Radio did not start up properly\n"); "Radio did not start up properly\n");
radio->users = 0;
unlock_kernel(); unlock_kernel();
return -EIO; return -EIO;
} }
...@@ -578,10 +575,6 @@ static int usb_dsbr100_close(struct file *file) ...@@ -578,10 +575,6 @@ static int usb_dsbr100_close(struct file *file)
if (!radio) if (!radio)
return -ENODEV; return -ENODEV;
mutex_lock(&radio->lock);
radio->users = 0;
mutex_unlock(&radio->lock);
if (!radio->removed) { if (!radio->removed) {
retval = dsbr100_stop(radio); retval = dsbr100_stop(radio);
if (retval < 0) { if (retval < 0) {
...@@ -695,7 +688,6 @@ static int usb_dsbr100_probe(struct usb_interface *intf, ...@@ -695,7 +688,6 @@ static int usb_dsbr100_probe(struct usb_interface *intf,
mutex_init(&radio->lock); mutex_init(&radio->lock);
radio->removed = 0; radio->removed = 0;
radio->users = 0;
radio->usbdev = interface_to_usbdev(intf); radio->usbdev = interface_to_usbdev(intf);
radio->curfreq = FREQ_MIN * FREQ_MUL; radio->curfreq = FREQ_MIN * FREQ_MUL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment