Skip to content

Commit

Permalink
V4L/DVB (13070): radio-mr800: fix behavior of set_stereo function
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Ellingsworth authored and Mauro Carvalho Chehab committed Dec 5, 2009
1 parent 502d501 commit 30dd450
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions drivers/media/radio/radio-mr800.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 30dd450

Please sign in to comment.