The patch number 9980 was added via Mauro Carvalho Chehab <[email protected]>
to http://linuxtv.org/hg/v4l-dvb master development tree.
Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel
If anyone has any objections, please let us know by sending a message to:
[email protected]
------
From: Mauro Carvalho Chehab <[email protected]>
em28xx: simplify analog logic
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 <[email protected]>
---
linux/drivers/media/video/em28xx/em28xx-cards.c | 6 ------
linux/drivers/media/video/em28xx/em28xx-video.c | 13 ++++---------
linux/drivers/media/video/em28xx/em28xx.h | 1 -
3 files changed, 4 insertions(+), 16 deletions(-)
diff -r c4a60c58d58b -r 76527ca9283a
linux/drivers/media/video/em28xx/em28xx-cards.c
--- a/linux/drivers/media/video/em28xx/em28xx-cards.c Sun Dec 28 23:18:14
2008 -0200
+++ b/linux/drivers/media/video/em28xx/em28xx-cards.c Sun Dec 28 23:26:36
2008 -0200
@@ -2031,12 +2031,6 @@ int em28xx_init_dev(struct em28xx **devh
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 -r c4a60c58d58b -r 76527ca9283a
linux/drivers/media/video/em28xx/em28xx-video.c
--- a/linux/drivers/media/video/em28xx/em28xx-video.c Sun Dec 28 23:18:14
2008 -0200
+++ b/linux/drivers/media/video/em28xx/em28xx-video.c Sun Dec 28 23:26:36
2008 -0200
@@ -2017,8 +2017,10 @@ static struct video_device *em28xx_vdev_
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,
@@ -2053,13 +2055,6 @@ int em28xx_analog_config(struct em28xx *
/* 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");
diff -r c4a60c58d58b -r 76527ca9283a linux/drivers/media/video/em28xx/em28xx.h
--- a/linux/drivers/media/video/em28xx/em28xx.h Sun Dec 28 23:18:14 2008 -0200
+++ b/linux/drivers/media/video/em28xx/em28xx.h Sun Dec 28 23:26:36 2008 -0200
@@ -606,7 +606,6 @@ void em28xx_close_extension(struct em28x
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);
---
Patch is available at:
http://linuxtv.org/hg/v4l-dvb/rev/76527ca9283af3542ee0a2d752d32c52423336df
_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits