Bonjour,
I installed Mandrake kernel 2.4.22 (2.4.22-5mdk)
Seems that some lm-sensors 2.8 i2c stuff made his way to kernel 2.4.22.
I have made some changes in the driver that compile, load and I am able
to see an image with xawtv -c /dev/video0.
If this makes sense that is the diff -u below.
I am not an expert in #ifdef sp it may more ugly than necessary feel
free to change.
diff -u driver-zoran-cvs-20030905/adv7170.c
driver-zoran-modif-2.4.22/adv7170.c
--- driver-zoran-cvs-20030905/adv7170.c 2003-08-23 17:41:55.000000000
-0400
+++ driver-zoran-modif-2.4.22/adv7170.c 2003-09-06 23:02:37.000000000
-0400
@@ -518,7 +518,7 @@
return 0;
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,22)
static void
adv7170_inc_use (struct i2c_client *client)
{
@@ -546,7 +546,7 @@
.attach_adapter = adv7170_attach_adapter,
.detach_client = adv7170_detach_client,
.command = adv7170_command,
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,22)
.inc_use = adv7170_inc_use,
.dec_use = adv7170_dec_use,
#endif
diff -u driver-zoran-cvs-20030905/adv7175.c
driver-zoran-modif-2.4.22/adv7175.c
--- driver-zoran-cvs-20030905/adv7175.c 2003-08-23 17:41:55.000000000
-0400
+++ driver-zoran-modif-2.4.22/adv7175.c 2003-09-06 23:02:37.000000000
-0400
@@ -540,7 +540,7 @@
return 0;
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,22)
static void
adv7175_inc_use (struct i2c_client *client)
{
@@ -568,7 +568,7 @@
.attach_adapter = adv7175_attach_adapter,
.detach_client = adv7175_detach_client,
.command = adv7175_command,
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,22)
.inc_use = adv7175_inc_use,
.dec_use = adv7175_dec_use,
#endif
diff -u driver-zoran-cvs-20030905/bt819.c
driver-zoran-modif-2.4.22/bt819.c
--- driver-zoran-cvs-20030905/bt819.c 2003-08-23 17:41:55.000000000
-0400
+++ driver-zoran-modif-2.4.22/bt819.c 2003-09-06 23:02:37.000000000
-0400
@@ -644,7 +644,7 @@
return 0;
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,22)
static void
bt819_inc_use (struct i2c_client *client)
{
@@ -672,7 +672,7 @@
.attach_adapter = bt819_attach_adapter,
.detach_client = bt819_detach_client,
.command = bt819_command,
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,22)
.inc_use = bt819_inc_use,
.dec_use = bt819_dec_use,
#endif
diff -u driver-zoran-cvs-20030905/bt856.c
driver-zoran-modif-2.4.22/bt856.c
--- driver-zoran-cvs-20030905/bt856.c 2003-08-23 17:41:55.000000000
-0400
+++ driver-zoran-modif-2.4.22/bt856.c 2003-09-06 23:02:37.000000000
-0400
@@ -425,7 +425,7 @@
return 0;
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,22)
static void
bt856_inc_use (struct i2c_client *client)
{
@@ -453,7 +453,7 @@
.attach_adapter = bt856_attach_adapter,
.detach_client = bt856_detach_client,
.command = bt856_command,
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,22)
.inc_use = bt856_inc_use,
.dec_use = bt856_dec_use,
#endif
Common subdirectories: driver-zoran-cvs-20030905/CVS and
driver-zoran-modif-2.4.22/CVS
diff -u driver-zoran-cvs-20030905/saa7110.c
driver-zoran-modif-2.4.22/saa7110.c
--- driver-zoran-cvs-20030905/saa7110.c 2003-08-23 17:41:55.000000000
-0400
+++ driver-zoran-modif-2.4.22/saa7110.c 2003-09-06 23:02:37.000000000
-0400
@@ -600,7 +600,7 @@
return 0;
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,22)
static void
saa7110_inc_use (struct i2c_client *client)
{
@@ -628,7 +628,7 @@
.attach_adapter = saa7110_attach_adapter,
.detach_client = saa7110_detach_client,
.command = saa7110_command,
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,22)
.inc_use = saa7110_inc_use,
.dec_use = saa7110_dec_use,
#endif
diff -u driver-zoran-cvs-20030905/saa7111.c
driver-zoran-modif-2.4.22/saa7111.c
--- driver-zoran-cvs-20030905/saa7111.c 2003-08-23 17:41:55.000000000
-0400
+++ driver-zoran-modif-2.4.22/saa7111.c 2003-09-06 23:02:37.000000000
-0400
@@ -561,7 +561,7 @@
return 0;
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,22)
static void
saa7111_inc_use (struct i2c_client *client)
{
@@ -589,7 +589,7 @@
.attach_adapter = saa7111_attach_adapter,
.detach_client = saa7111_detach_client,
.command = saa7111_command,
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,22)
.inc_use = saa7111_inc_use,
.dec_use = saa7111_dec_use,
#endif
diff -u driver-zoran-cvs-20030905/saa7114.c
driver-zoran-modif-2.4.22/saa7114.c
--- driver-zoran-cvs-20030905/saa7114.c 2003-08-23 17:41:55.000000000
-0400
+++ driver-zoran-modif-2.4.22/saa7114.c 2003-09-06 23:02:37.000000000
-0400
@@ -1224,7 +1224,7 @@
return 0;
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,22)
static void
saa7114_inc_use (struct i2c_client *client)
{
@@ -1252,7 +1252,7 @@
.attach_adapter = saa7114_attach_adapter,
.detach_client = saa7114_detach_client,
.command = saa7114_command,
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,22)
.inc_use = saa7114_inc_use,
.dec_use = saa7114_dec_use,
#endif
diff -u driver-zoran-cvs-20030905/saa7185.c
driver-zoran-modif-2.4.22/saa7185.c
--- driver-zoran-cvs-20030905/saa7185.c 2003-08-23 17:41:55.000000000
-0400
+++ driver-zoran-modif-2.4.22/saa7185.c 2003-09-06 23:02:37.000000000
-0400
@@ -507,7 +507,7 @@
return 0;
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,22)
static void
saa7185_inc_use (struct i2c_client *client)
{
@@ -535,7 +535,7 @@
.attach_adapter = saa7185_attach_adapter,
.detach_client = saa7185_detach_client,
.command = saa7185_command,
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,22)
.inc_use = saa7185_inc_use,
.dec_use = saa7185_dec_use,
#endif
diff -u driver-zoran-cvs-20030905/vpx3220.c
driver-zoran-modif-2.4.22/vpx3220.c
--- driver-zoran-cvs-20030905/vpx3220.c 2003-09-01 16:34:54.000000000
-0400
+++ driver-zoran-modif-2.4.22/vpx3220.c 2003-09-06 23:02:37.000000000
-0400
@@ -732,7 +732,7 @@
return ret;
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,22)
static void
vpx3220_inc_use (struct i2c_client *client)
{
@@ -762,7 +762,7 @@
.attach_adapter = vpx3220_attach_adapter,
.detach_client = vpx3220_detach_client,
.command = vpx3220_command,
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,22)
.inc_use = vpx3220_inc_use,
.dec_use = vpx3220_dec_use,
#endif
diff -u driver-zoran-cvs-20030905/zoran_driver.c
driver-zoran-modif-2.4.22/zoran_driver.c
--- driver-zoran-cvs-20030905/zoran_driver.c 2003-08-23
17:41:55.000000000 -0400
+++ driver-zoran-modif-2.4.22/zoran_driver.c 2003-09-07
08:36:36.000000000 -0400
@@ -1295,12 +1295,14 @@
goto open_unlock_and_return;
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,22)
/* try to grab a module lock */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
- MOD_INC_USE_COUNT;
i2c_inc_use_client(zr->decoder);
if (zr->encoder)
i2c_inc_use_client(zr->encoder);
+#endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+ MOD_INC_USE_COUNT;
#else
if (!try_module_get(THIS_MODULE)) {
dprintk(1,
@@ -1393,10 +1395,12 @@
open_unlock_and_return:
/* if we grabbed locks, release them accordingly */
if (have_module_locks) {
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,22)
i2c_dec_use_client(zr->decoder);
if (zr->encoder)
i2c_dec_use_client(zr->encoder);
+#endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
MOD_DEC_USE_COUNT;
#else
module_put(zr->decoder->driver->owner);
@@ -1467,11 +1471,13 @@
kfree(fh->overlay_mask);
kfree(fh);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,22)
/* release locks on the i2c modules */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
i2c_dec_use_client(zr->decoder);
if (zr->encoder)
i2c_dec_use_client(zr->encoder);
+#endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
MOD_DEC_USE_COUNT;
#else
module_put(zr->decoder->driver->owner);
Benoit
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Mjpeg-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mjpeg-users