diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-12 23:54:44 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-12 23:54:44 -0200 |
commit | 71860dbdbc561e6e67353843a30183bcaa08b94f (patch) | |
tree | 36ff3bd37bc0877c191d5c9fc0ebf30ccc34082a | |
parent | 306ede601c9b5ba08934c08f91d0250cd576baec (diff) | |
parent | 84cd3a09ddb269ab040c5f58a9a667948f55f037 (diff) | |
download | mediapointer-dvb-s2-71860dbdbc561e6e67353843a30183bcaa08b94f.tar.gz mediapointer-dvb-s2-71860dbdbc561e6e67353843a30183bcaa08b94f.tar.bz2 |
merge: http://linuxtv.org/hg/~dougsland/radio-mr800/
From: Mauro Carvalho Chehab <mchehab@redhat.com>
Priority: normal
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | linux/drivers/media/radio/dsbr100.c | 8 | ||||
-rw-r--r-- | linux/drivers/media/radio/radio-mr800.c | 3 | ||||
-rw-r--r-- | linux/drivers/media/radio/radio-zoltrix.c | 17 |
3 files changed, 22 insertions, 6 deletions
diff --git a/linux/drivers/media/radio/dsbr100.c b/linux/drivers/media/radio/dsbr100.c index f3af92b59..7172977c7 100644 --- a/linux/drivers/media/radio/dsbr100.c +++ b/linux/drivers/media/radio/dsbr100.c @@ -361,11 +361,15 @@ static int vidioc_s_ctrl(struct file *file, void *priv, switch (ctrl->id) { case V4L2_CID_AUDIO_MUTE: if (ctrl->value) { - if (dsbr100_stop(radio)==-1) + if (dsbr100_stop(radio) == -1) { warn("Radio did not respond properly"); + return -EBUSY; + } } else { - if (dsbr100_start(radio)==-1) + if (dsbr100_start(radio) == -1) { warn("Radio did not respond properly"); + return -EBUSY; + } } return 0; } diff --git a/linux/drivers/media/radio/radio-mr800.c b/linux/drivers/media/radio/radio-mr800.c index a33717c48..2ae8e1447 100644 --- a/linux/drivers/media/radio/radio-mr800.c +++ b/linux/drivers/media/radio/radio-mr800.c @@ -58,6 +58,7 @@ #include <media/v4l2-ioctl.h> #include <linux/usb.h> #include <linux/version.h> /* for KERNEL_VERSION MACRO */ +#include "compat.h" /* driver and module definitions */ #define DRIVER_AUTHOR "Alexey Klimov <klimov.linux@gmail.com>" @@ -159,7 +160,9 @@ static struct usb_driver usb_amradio_driver = { .disconnect = usb_amradio_disconnect, .suspend = usb_amradio_suspend, .resume = usb_amradio_resume, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 23) .reset_resume = usb_amradio_resume, +#endif .id_table = usb_amradio_device_table, .supports_autosuspend = 1, }; diff --git a/linux/drivers/media/radio/radio-zoltrix.c b/linux/drivers/media/radio/radio-zoltrix.c index 615165b57..61b0366ab 100644 --- a/linux/drivers/media/radio/radio-zoltrix.c +++ b/linux/drivers/media/radio/radio-zoltrix.c @@ -124,8 +124,11 @@ static int zol_setfreq(struct zol_device *dev, unsigned long freq) unsigned int stereo = dev->stereo; int i; - if (freq == 0) - return 1; + if (freq == 0) { + printk(KERN_WARNING "zoltrix: received zero freq. Failed to set.\n"); + return -EINVAL; + } + m = (freq / 160 - 8800) * 2; f = (unsigned long long) m + 0x4d1c; @@ -280,7 +283,10 @@ static int vidioc_s_frequency(struct file *file, void *priv, struct zol_device *zol = video_drvdata(file); zol->curfreq = f->frequency; - zol_setfreq(zol, zol->curfreq); + if (zol_setfreq(zol, zol->curfreq) != 0) { + printk(KERN_WARNING "zoltrix: Set frequency failed.\n"); + return -EINVAL; + } return 0; } @@ -344,7 +350,10 @@ static int vidioc_s_ctrl(struct file *file, void *priv, return 0; } zol->stereo = 1; - zol_setfreq(zol, zol->curfreq); + if (zol_setfreq(zol, zol->curfreq) != 0) { + printk(KERN_WARNING "zoltrix: Set frequency failed.\n"); + return -EINVAL; + } #if 0 /*keep*/ /* FIXME: Implement stereo/mono switch on V4L2 */ if (v->mode & VIDEO_SOUND_STEREO) { |