]> git.baikalelectronics.ru Git - kernel.git/commit
[media] saa7134: use input types, instead of hardcoding strings
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>
Fri, 5 Feb 2016 12:24:37 +0000 (10:24 -0200)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Wed, 10 Feb 2016 09:23:42 +0000 (07:23 -0200)
commitaeaa22a6f87ff9bfa1c9986fb99a701cb7097bc4
tree22670a3a50fec82c2bf7dd73fc25d973addc6f1b
parent67d2a6d771daec642b6dec709349e852517c53c6
[media] saa7134: use input types, instead of hardcoding strings

Currently, the saa7134 driver is hardcoding input names on each
board entry. More modern drivers define, instead, an enum for each
input type.

While the current logic works, it adds extra complexity at the driver,
as it needs to discover the type of the input using some euristics.

Instead, let's standardize the input types and use a type, instead of
a name on all places.

That will allow further patches to properly report the input type
via VIDIOC_G_INPUT and to remove an extra field from the struct to
identify if the input is for TV.

Please notice that several boards define an input for receiving composite
signals via a S-Video connector. The name of such input was inconsistent,
so this patch cleans it and make it to be properly reported the
same way for all boards.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/pci/saa7134/saa7134-cards.c
drivers/media/pci/saa7134/saa7134-core.c
drivers/media/pci/saa7134/saa7134-tvaudio.c
drivers/media/pci/saa7134/saa7134-video.c
drivers/media/pci/saa7134/saa7134.h