On Nov 13, 2007, at 4:42 PM, Hans Verkuil wrote:
> I heard more reports about compatibility problems and I traced it to
> some recent videodev changes that break compatibility for kernels <
> 2.6.19. So in order to test this you need a kernel >- 2.6.19.
I looked into this last week and I'm pretty confident this is just a
bogus version test. If you look at the lines near the errors
mentioned, you'll see a check for kernel 2.6.13; however, struct class
didn't gain .dev_attrs, and hadn't renamed .release to .dev_release,
until 2.6.19.
If you change both #if LINUX_VERSION_CODE lines from 13 to 19 you'll
get it to compile (with a warning), but there will be another error
v4l1-compat.c that I'm not entirely sure of how to handle. At least on
my system it chokes on the __pure attribute to palette_to_pixelformat().
The patch I used to get the latest v4l-dvb to compile is appended. It
seems to work for me but I can't guarantee its correctness, YMMV, etc.
--scott
diff -r b9523a14ccea linux/drivers/media/video/v4l1-compat.c
--- a/linux/drivers/media/video/v4l1-compat.c Sun Nov 04 14:34:05 2007
-0200
+++ b/linux/drivers/media/video/v4l1-compat.c Wed Nov 07 00:00:45 2007
-0600
@@ -145,7 +145,7 @@ const static unsigned int palette2pixelf
[VIDEO_PALETTE_YUV422P] = V4L2_PIX_FMT_YUV422P,
};
-static unsigned int __pure
+static unsigned int /* __pure */
palette_to_pixelformat(unsigned int palette)
{
if (palette < ARRAY_SIZE(palette2pixelformat))
diff -r b9523a14ccea linux/drivers/media/video/videodev.c
--- a/linux/drivers/media/video/videodev.c Sun Nov 04 14:34:05 2007
-0200
+++ b/linux/drivers/media/video/videodev.c Tue Nov 06 19:31:57 2007
-0600
@@ -111,7 +111,7 @@ static void video_release(struct device
vfd->release(vfd);
}
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)
static struct device_attribute video_device_attrs[] = {
__ATTR(name, S_IRUGO, show_name, NULL),
__ATTR_NULL
@@ -120,7 +120,7 @@ static struct device_attribute video_dev
static struct class video_class = {
.name = VIDEO_NAME,
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
.release = video_release,
#else
.dev_attrs = video_device_attrs,
_______________________________________________
ivtv-users mailing list
[email protected]
http://ivtvdriver.org/mailman/listinfo/ivtv-users