summaryrefslogtreecommitdiffstats
path: root/drivers/media/radio
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2013-01-30 15:26:36 +0100
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-02-05 21:10:37 +0100
commitf122d9a83e5d1e73f34da9fb832c9b005030b9cb (patch)
treefa412496b4174562bd740e4c128b82c4f6921dad /drivers/media/radio
parent[media] tvaudio: convert to the control framework (diff)
downloadlinux-f122d9a83e5d1e73f34da9fb832c9b005030b9cb.tar.xz
linux-f122d9a83e5d1e73f34da9fb832c9b005030b9cb.zip
[media] radio-miropcm20: fix querycap
Don't set version (done by the v4l2 core), fill in bus_info, set correct driver name and add device_caps support. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/radio')
-rw-r--r--drivers/media/radio/radio-miropcm20.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/media/radio/radio-miropcm20.c b/drivers/media/radio/radio-miropcm20.c
index 11f76ed4c6fb..3a89e50ade6c 100644
--- a/drivers/media/radio/radio-miropcm20.c
+++ b/drivers/media/radio/radio-miropcm20.c
@@ -79,11 +79,13 @@ static const struct v4l2_file_operations pcm20_fops = {
static int vidioc_querycap(struct file *file, void *priv,
struct v4l2_capability *v)
{
+ struct pcm20 *dev = video_drvdata(file);
+
strlcpy(v->driver, "Miro PCM20", sizeof(v->driver));
strlcpy(v->card, "Miro PCM20", sizeof(v->card));
- strlcpy(v->bus_info, "ISA", sizeof(v->bus_info));
- v->version = 0x1;
- v->capabilities = V4L2_CAP_TUNER | V4L2_CAP_RADIO;
+ snprintf(v->bus_info, sizeof(v->bus_info), "ISA:%s", dev->v4l2_dev.name);
+ v->device_caps = V4L2_CAP_TUNER | V4L2_CAP_RADIO;
+ v->capabilities = v->device_caps | V4L2_CAP_DEVICE_CAPS;
return 0;
}
@@ -229,7 +231,7 @@ static int __init pcm20_init(void)
"you must load the snd-miro driver first!\n");
return -ENODEV;
}
- strlcpy(v4l2_dev->name, "miropcm20", sizeof(v4l2_dev->name));
+ strlcpy(v4l2_dev->name, "radio-miropcm20", sizeof(v4l2_dev->name));
mutex_init(&dev->lock);
res = v4l2_device_register(NULL, v4l2_dev);