aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/radio/dsbr100.c
diff options
context:
space:
mode:
authorAlexey Klimov <klimov.linux@gmail.com>2009-06-10 23:17:06 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-06-16 18:07:34 -0400
commit6f094eb9a860bcde45984e8ab87965f39ceda427 (patch)
tree3e55c7287c87aca2d7a808728157ba7283d5ced8 /drivers/media/radio/dsbr100.c
parent92051b285b12855255f0213d9a25153d917e262c (diff)
V4L/DVB (11954): dsbr100: remove radio->users counter
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>
Diffstat (limited to 'drivers/media/radio/dsbr100.c')
-rw-r--r--drivers/media/radio/dsbr100.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/drivers/media/radio/dsbr100.c b/drivers/media/radio/dsbr100.c
index 613576202294..2852242e07eb 100644
--- a/drivers/media/radio/dsbr100.c
+++ b/drivers/media/radio/dsbr100.c
@@ -145,7 +145,6 @@ struct dsbr100_device {
145 struct mutex lock; /* buffer locking */ 145 struct mutex lock; /* buffer locking */
146 int curfreq; 146 int curfreq;
147 int stereo; 147 int stereo;
148 int users;
149 int removed; 148 int removed;
150 int muted; 149 int muted;
151}; 150};
@@ -549,14 +548,12 @@ static int usb_dsbr100_open(struct file *file)
549 int retval; 548 int retval;
550 549
551 lock_kernel(); 550 lock_kernel();
552 radio->users = 1;
553 radio->muted = 1; 551 radio->muted = 1;
554 552
555 retval = dsbr100_start(radio); 553 retval = dsbr100_start(radio);
556 if (retval < 0) { 554 if (retval < 0) {
557 dev_warn(&radio->usbdev->dev, 555 dev_warn(&radio->usbdev->dev,
558 "Radio did not start up properly\n"); 556 "Radio did not start up properly\n");
559 radio->users = 0;
560 unlock_kernel(); 557 unlock_kernel();
561 return -EIO; 558 return -EIO;
562 } 559 }
@@ -578,10 +575,6 @@ static int usb_dsbr100_close(struct file *file)
578 if (!radio) 575 if (!radio)
579 return -ENODEV; 576 return -ENODEV;
580 577
581 mutex_lock(&radio->lock);
582 radio->users = 0;
583 mutex_unlock(&radio->lock);
584
585 if (!radio->removed) { 578 if (!radio->removed) {
586 retval = dsbr100_stop(radio); 579 retval = dsbr100_stop(radio);
587 if (retval < 0) { 580 if (retval < 0) {
@@ -695,7 +688,6 @@ static int usb_dsbr100_probe(struct usb_interface *intf,
695 mutex_init(&radio->lock); 688 mutex_init(&radio->lock);
696 689
697 radio->removed = 0; 690 radio->removed = 0;
698 radio->users = 0;
699 radio->usbdev = interface_to_usbdev(intf); 691 radio->usbdev = interface_to_usbdev(intf);
700 radio->curfreq = FREQ_MIN * FREQ_MUL; 692 radio->curfreq = FREQ_MIN * FREQ_MUL;
701 693