summaryrefslogtreecommitdiff
path: root/linux/drivers/media
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2008-12-28 23:26:36 -0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-12-28 23:26:36 -0200
commit9b4cfe3aca4123a0279d63449c540a2fdd5fddca (patch)
treec7571075cf920cc4569a8f7712cf29d7d56b5e47 /linux/drivers/media
parent3766a9a9af7ff55a75166176dc58d5a7546e4d63 (diff)
downloadmediapointer-dvb-s2-9b4cfe3aca4123a0279d63449c540a2fdd5fddca.tar.gz
mediapointer-dvb-s2-9b4cfe3aca4123a0279d63449c540a2fdd5fddca.tar.bz2
em28xx: simplify analog logic
From: Mauro Carvalho Chehab <mchehab@redhat.com> Now, just two routines are enough for analog: the first one configs the analog part and register V4L2 devices, and the second one release analog devices. After this patch, it will be easier to transform em28xx-video into an em28xx extension, loaded only on analog devices. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media')
-rw-r--r--linux/drivers/media/video/em28xx/em28xx-cards.c6
-rw-r--r--linux/drivers/media/video/em28xx/em28xx-video.c11
-rw-r--r--linux/drivers/media/video/em28xx/em28xx.h1
3 files changed, 3 insertions, 15 deletions
diff --git a/linux/drivers/media/video/em28xx/em28xx-cards.c b/linux/drivers/media/video/em28xx/em28xx-cards.c
index 63a7082a0..0c0571d0c 100644
--- a/linux/drivers/media/video/em28xx/em28xx-cards.c
+++ b/linux/drivers/media/video/em28xx/em28xx-cards.c
@@ -2031,12 +2031,6 @@ int em28xx_init_dev(struct em28xx **devhandle, struct usb_device *udev,
em28xx_add_into_devlist(dev);
- errCode = em28xx_analog_config(dev);
- if (errCode) {
- em28xx_errdev("error configuring device\n");
- return -ENOMEM;
- }
-
retval = em28xx_register_analog_devices(dev);
if (retval < 0) {
em28xx_release_resources(dev);
diff --git a/linux/drivers/media/video/em28xx/em28xx-video.c b/linux/drivers/media/video/em28xx/em28xx-video.c
index 3e9fa0517..8be7aadac 100644
--- a/linux/drivers/media/video/em28xx/em28xx-video.c
+++ b/linux/drivers/media/video/em28xx/em28xx-video.c
@@ -2017,8 +2017,10 @@ static struct video_device *em28xx_vdev_init(struct em28xx *dev,
return vfd;
}
-int em28xx_analog_config(struct em28xx *dev)
+int em28xx_register_analog_devices(struct em28xx *dev)
{
+ int ret;
+
printk(KERN_INFO "%s: v4l2 driver version %d.%d.%d\n",
dev->name,
(EM28XX_VERSION_CODE >> 16) & 0xff,
@@ -2054,13 +2056,6 @@ int em28xx_analog_config(struct em28xx *dev)
/* FIXME: This is a very bad hack! Not all devices have TV on input 2 */
dev->ctl_input = 2;
- return 0;
-}
-
-int em28xx_register_analog_devices(struct em28xx *dev)
-{
- int ret;
-
/* allocate and fill video video_device struct */
dev->vdev = em28xx_vdev_init(dev, &em28xx_video_template, "video");
if (!dev->vdev) {
diff --git a/linux/drivers/media/video/em28xx/em28xx.h b/linux/drivers/media/video/em28xx/em28xx.h
index 866f7a272..a94ec33a2 100644
--- a/linux/drivers/media/video/em28xx/em28xx.h
+++ b/linux/drivers/media/video/em28xx/em28xx.h
@@ -606,7 +606,6 @@ void em28xx_init_extension(struct em28xx *dev);
void em28xx_close_extension(struct em28xx *dev);
/* Provided by em28xx-video.c */
-int em28xx_analog_config(struct em28xx *dev);
int em28xx_register_analog_devices(struct em28xx *dev);
void em28xx_release_analog_resources(struct em28xx *dev);