V4L/DVB (11954): dsbr100: remove radio->users counter
authorAlexey Klimov <klimov.linux@gmail.com>
Thu, 11 Jun 2009 03:17:06 +0000 (00:17 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 16 Jun 2009 22:07:34 +0000 (19:07 -0300)
Patch removes radio->users counter because it is not in use.

Signed-off-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/radio/dsbr100.c

index 6135762022940ec4095538bfa446803fb2be6373..2852242e07ebc3f9936c70b8d087d7f56ab6cfac 100644 (file)
@@ -145,7 +145,6 @@ struct dsbr100_device {
        struct mutex lock;      /* buffer locking */
        int curfreq;
        int stereo;
-       int users;
        int removed;
        int muted;
 };
@@ -549,14 +548,12 @@ static int usb_dsbr100_open(struct file *file)
        int retval;
 
        lock_kernel();
-       radio->users = 1;
        radio->muted = 1;
 
        retval = dsbr100_start(radio);
        if (retval < 0) {
                dev_warn(&radio->usbdev->dev,
                         "Radio did not start up properly\n");
-               radio->users = 0;
                unlock_kernel();
                return -EIO;
        }
@@ -578,10 +575,6 @@ static int usb_dsbr100_close(struct file *file)
        if (!radio)
                return -ENODEV;
 
-       mutex_lock(&radio->lock);
-       radio->users = 0;
-       mutex_unlock(&radio->lock);
-
        if (!radio->removed) {
                retval = dsbr100_stop(radio);
                if (retval < 0) {
@@ -695,7 +688,6 @@ static int usb_dsbr100_probe(struct usb_interface *intf,
        mutex_init(&radio->lock);
 
        radio->removed = 0;
-       radio->users = 0;
        radio->usbdev = interface_to_usbdev(intf);
        radio->curfreq = FREQ_MIN * FREQ_MUL;