aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/em28xx/em28xx-video.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-01-24 04:59:20 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-01-25 16:05:12 -0500
commited086314f4e41eb90a9107c7fb2737230686f668 (patch)
tree2408565ca609c1c788f7ae7524771dd94d8b80dc /drivers/media/video/em28xx/em28xx-video.c
parent72e04f720f23cfa8d4400d832784f3a424379227 (diff)
V4L/DVB (7060): em28xx: remove has_tuner
has_tuner flag doesn't make much sense, since tuner_type=TUNER_ABSENT means the same thing. Having two ways to say that a tuner is not present is not nice, since it may lead to bad setups. In fact, with the previous code, if a device were using has_tuner=0, but the user forces a tuner, with modprobe option tuner=type, the modprobe option won't work. Also, tveeprom returns TUNER_ABSENT, when tuner is unknown or absent. So, with the previous logic, in this case, the driver should set has_tuner=0, or has_tuner=1 otherwise. Instead of adding several additional tests and setups, better just to remove .has_tuner. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-video.c')
-rw-r--r--drivers/media/video/em28xx/em28xx-video.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c
index de95ca87424..a0c33467248 100644
--- a/drivers/media/video/em28xx/em28xx-video.c
+++ b/drivers/media/video/em28xx/em28xx-video.c
@@ -38,6 +38,7 @@
38#include "em28xx.h" 38#include "em28xx.h"
39#include <media/v4l2-common.h> 39#include <media/v4l2-common.h>
40#include <media/msp3400.h> 40#include <media/msp3400.h>
41#include <media/tuner.h>
41 42
42#define DRIVER_AUTHOR "Ludovico Cavedon <cavedon@sssup.it>, " \ 43#define DRIVER_AUTHOR "Ludovico Cavedon <cavedon@sssup.it>, " \
43 "Markus Rechberger <mrechberger@gmail.com>, " \ 44 "Markus Rechberger <mrechberger@gmail.com>, " \
@@ -928,7 +929,7 @@ static int vidioc_querycap(struct file *file, void *priv,
928 V4L2_CAP_AUDIO | 929 V4L2_CAP_AUDIO |
929 V4L2_CAP_READWRITE | V4L2_CAP_STREAMING; 930 V4L2_CAP_READWRITE | V4L2_CAP_STREAMING;
930 931
931 if (dev->has_tuner) 932 if (dev->tuner_type != TUNER_ABSENT)
932 cap->capabilities |= V4L2_CAP_TUNER; 933 cap->capabilities |= V4L2_CAP_TUNER;
933 934
934 return 0; 935 return 0;
@@ -1900,7 +1901,7 @@ static int em28xx_init_dev(struct em28xx **devhandle, struct usb_device *udev,
1900 em28xx_errdev("cannot allocate video_device.\n"); 1901 em28xx_errdev("cannot allocate video_device.\n");
1901 goto fail_unreg; 1902 goto fail_unreg;
1902 } 1903 }
1903 if (dev->has_tuner) 1904 if (dev->tuner_type != TUNER_ABSENT)
1904 dev->vdev->type |= VID_TYPE_TUNER; 1905 dev->vdev->type |= VID_TYPE_TUNER;
1905 1906
1906 /* register v4l2 video video_device */ 1907 /* register v4l2 video video_device */