summaryrefslogtreecommitdiff
path: root/drivers/media/pci/saa7134/saa7134-video.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-02-05 10:37:18 -0200
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-02-10 07:23:43 -0200
commit8bf77f9e7013e46ca08151189357532f027c47e8 (patch)
tree6eb195592bf0bb575532097e05689de2804ab114 /drivers/media/pci/saa7134/saa7134-video.c
parent568b2febeeb139879efe93756aa58e2e42559f90 (diff)
[media] saa7134: Get rid of struct saa7134_input.tv field
The saa7134_input.tv field was used to indicate if an input had a RF signal for TV input. This is not needed anymore, as the input type can be checked directly by the driver. Also, due to a past bug when setting the TV standard at the demod, all inputs should have this field set, with is wrong. This reduces the size of the saa7134_boards by about 8KB, on i386 (and probably twice on 64 bits), with is a nice colateral effect: text data bss dec hex filename 241047 136831 66356 444234 6c74a drivers/media/pci/saa7134/saa7134.o.old 240851 128895 66292 436038 6a746 drivers/media/pci/saa7134/saa7134.o Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/pci/saa7134/saa7134-video.c')
-rw-r--r--drivers/media/pci/saa7134/saa7134-video.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/media/pci/saa7134/saa7134-video.c b/drivers/media/pci/saa7134/saa7134-video.c
index 59781755247a..9debfb549887 100644
--- a/drivers/media/pci/saa7134/saa7134-video.c
+++ b/drivers/media/pci/saa7134/saa7134-video.c
@@ -1384,10 +1384,16 @@ int saa7134_enum_input(struct file *file, void *priv, struct v4l2_input *i)
if (card_in(dev, i->index).type == SAA7134_NO_INPUT)
return -EINVAL;
i->index = n;
- i->type = V4L2_INPUT_TYPE_CAMERA;
strcpy(i->name, saa7134_input_name[card_in(dev, n).type]);
- if (card_in(dev, n).tv)
+ switch (card_in(dev, n).type) {
+ case SAA7134_INPUT_TV:
+ case SAA7134_INPUT_TV_MONO:
i->type = V4L2_INPUT_TYPE_TUNER;
+ break;
+ default:
+ i->type = V4L2_INPUT_TYPE_CAMERA;
+ break;
+ }
if (n == dev->ctl_input) {
int v1 = saa_readb(SAA7134_STATUS_VIDEO1);
int v2 = saa_readb(SAA7134_STATUS_VIDEO2);
@@ -1656,7 +1662,8 @@ int saa7134_g_tuner(struct file *file, void *priv,
return -EINVAL;
memset(t, 0, sizeof(*t));
for (n = 0; n < SAA7134_INPUT_MAX; n++) {
- if (card_in(dev, n).tv)
+ if (card_in(dev, n).type == SAA7134_INPUT_TV ||
+ card_in(dev, n).type == SAA7134_INPUT_TV_MONO)
break;
}
if (n == SAA7134_INPUT_MAX)