summaryrefslogtreecommitdiffstats
path: root/drivers/media/radio/radio-mr800.c
diff options
context:
space:
mode:
authorDavid Ellingsworth <david@identd.dyndns.org>2009-09-23 18:16:38 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-12-05 18:40:11 -0200
commit30dd4508b97155a3f826f877d5750d8888bc3183 (patch)
treec5615af6a82a4757cfea373da012fc21b91bfef0 /drivers/media/radio/radio-mr800.c
parent502d50166cdef6cc8f63ab8c6ab35694ee39f608 (diff)
downloadtalos-obmc-linux-30dd4508b97155a3f826f877d5750d8888bc3183.tar.gz
talos-obmc-linux-30dd4508b97155a3f826f877d5750d8888bc3183.zip
V4L/DVB (13070): radio-mr800: fix behavior of set_stereo function
Fix behavior of set_stereo function. Signed-off-by: David Ellingsworth <david@identd.dyndns.org> Acked-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/radio-mr800.c')
-rw-r--r--drivers/media/radio/radio-mr800.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/media/radio/radio-mr800.c b/drivers/media/radio/radio-mr800.c
index 7db992d3b0db..9764eca2c498 100644
--- a/drivers/media/radio/radio-mr800.c
+++ b/drivers/media/radio/radio-mr800.c
@@ -252,12 +252,13 @@ static int amradio_set_stereo(struct amradio_device *radio, char argument)
retval = usb_bulk_msg(radio->usbdev, usb_sndintpipe(radio->usbdev, 2),
(void *) (radio->buffer), BUFFER_LENGTH, &size, USB_TIMEOUT);
- if (retval < 0 || size != BUFFER_LENGTH) {
- radio->stereo = -1;
+ if (retval < 0 || size != BUFFER_LENGTH)
return retval;
- }
- radio->stereo = 1;
+ if (argument == WANT_STEREO)
+ radio->stereo = 1;
+ else
+ radio->stereo = 0;
return retval;
}
OpenPOWER on IntegriCloud