From: David Ellingsworth Date: Wed, 23 Sep 2009 21:16:38 +0000 (-0300) Subject: V4L/DVB (13070): radio-mr800: fix behavior of set_stereo function X-Git-Tag: v2.6.33-rc1~338^2~321 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=30dd4508b97155a3f826f877d5750d8888bc3183;p=karo-tx-linux.git V4L/DVB (13070): radio-mr800: fix behavior of set_stereo function Fix behavior of set_stereo function. Signed-off-by: David Ellingsworth Acked-by: Alexey Klimov Signed-off-by: Douglas Schilling Landgraf Signed-off-by: Mauro Carvalho Chehab --- 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; }