Commit 8bf77f9e authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

[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: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 568b2feb
This diff is collapsed.
......@@ -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)
......
......@@ -384,7 +384,6 @@ struct saa7134_input {
unsigned int vmux;
enum saa7134_audio_in amux;
unsigned int gpio;
unsigned int tv:1;
};
enum saa7134_mpeg_type {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment