diff options
author | Antti Palosaari <crope@iki.fi> | 2013-12-11 18:03:07 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-03-05 12:14:59 -0500 |
commit | d42626bda4629ed9ad2ebcf44a7fece0777caa58 (patch) | |
tree | 27d003c338a63761d364a3f33fffbffa322accf7 /drivers/media/v4l2-core/v4l2-dev.c | |
parent | 5121288d23e1417cce4907f7d875e3bfbf50ac4c (diff) |
[media] v4l: add device type for Software Defined Radio
Add new V4L device type VFL_TYPE_SDR for Software Defined Radio.
It is registered as /dev/swradio0 (/dev/sdr0 was already reserved).
Signed-off-by: Antti Palosaari <crope@iki.fi>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/v4l2-core/v4l2-dev.c')
-rw-r--r-- | drivers/media/v4l2-core/v4l2-dev.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/media/v4l2-core/v4l2-dev.c b/drivers/media/v4l2-core/v4l2-dev.c index 0a30dbf3d05c..9764ca04f8e2 100644 --- a/drivers/media/v4l2-core/v4l2-dev.c +++ b/drivers/media/v4l2-core/v4l2-dev.c | |||
@@ -758,6 +758,8 @@ static void determine_valid_ioctls(struct video_device *vdev) | |||
758 | * %VFL_TYPE_RADIO - A radio card | 758 | * %VFL_TYPE_RADIO - A radio card |
759 | * | 759 | * |
760 | * %VFL_TYPE_SUBDEV - A subdevice | 760 | * %VFL_TYPE_SUBDEV - A subdevice |
761 | * | ||
762 | * %VFL_TYPE_SDR - Software Defined Radio | ||
761 | */ | 763 | */ |
762 | int __video_register_device(struct video_device *vdev, int type, int nr, | 764 | int __video_register_device(struct video_device *vdev, int type, int nr, |
763 | int warn_if_nr_in_use, struct module *owner) | 765 | int warn_if_nr_in_use, struct module *owner) |
@@ -797,6 +799,10 @@ int __video_register_device(struct video_device *vdev, int type, int nr, | |||
797 | case VFL_TYPE_SUBDEV: | 799 | case VFL_TYPE_SUBDEV: |
798 | name_base = "v4l-subdev"; | 800 | name_base = "v4l-subdev"; |
799 | break; | 801 | break; |
802 | case VFL_TYPE_SDR: | ||
803 | /* Use device name 'swradio' because 'sdr' was already taken. */ | ||
804 | name_base = "swradio"; | ||
805 | break; | ||
800 | default: | 806 | default: |
801 | printk(KERN_ERR "%s called with unknown type: %d\n", | 807 | printk(KERN_ERR "%s called with unknown type: %d\n", |
802 | __func__, type); | 808 | __func__, type); |