It works perfectly! Thanks to you and zaryad .

(Sorry for the 4 times post but I don't why that happened !)

Sander Sweers a écrit :
> On zo, 2007-05-06 at 19:41 +0000, [EMAIL PROTECTED] wrote:
>   
>> Hi Everybody,
>>     
>
> Hi, hi, hi and hi (your message got posted to the list only 4 times).
>
>   
>> I'm writting because I do not manage to build ivtv for kernel 2.6.21.
>> After launching make command, I got this :
>> make -C driver all
>> make[1]: Entering directory `/home/hopper/Ivtv/ivtv-0.10.1/driver'
>> make -C /lib/modules/2.6.21-gentoo/build
>> M=/home/hopper/Ivtv/ivtv-0.10.1/driver modules
>> make[2]: Entering directory `/usr/src/linux-2.6.21-gentoo'
>> CC [M] /home/hopper/Ivtv/ivtv-0.10.1/driver/ivtv-ioctl.o
>> /home/hopper/Ivtv/ivtv-0.10.1/driver/ivtv-ioctl.c: In function
>> 'ivtv_internal_ioctls':
>> /home/hopper/Ivtv/ivtv-0.10.1/driver/ivtv-ioctl.c:559: error: 'struct
>> v4l2_register' has no member named 'i2c_id'
>> /home/hopper/Ivtv/ivtv-0.10.1/driver/ivtv-ioctl.c:560: error: 'struct
>> v4l2_register' has no member named 'i2c_id'
>> /home/hopper/Ivtv/ivtv-0.10.1/driver/ivtv-ioctl.c:569: error: 'struct
>> v4l2_register' has no member named 'i2c_id'
>> /home/hopper/Ivtv/ivtv-0.10.1/driver/ivtv-ioctl.c:570: error: 'struct
>> v4l2_register' has no member named 'i2c_id'
>> make[3]: *** [/home/hopper/Ivtv/ivtv-0.10.1/driver/ivtv-ioctl.o] Error
>> 1
>> make[2]: *** [_module_/home/hopper/Ivtv/ivtv-0.10.1/driver] Error 2
>> make[2]: Leaving directory `/usr/src/linux-2.6.21-gentoo'
>> make[1]: *** [all] Error 2
>> make[1]: Leaving directory `/home/hopper/Ivtv/ivtv-0.10.1/driver'
>> make: *** [all] Error 2
>>     
>
> Apply attached patch from [EMAIL PROTECTED]
>
> Greets
> Sander
>   
> ------------------------------------------------------------------------
>
> diff -u -r 0.10.1/driver/ivtv-ioctl.c 0.10.1p/driver/ivtv-ioctl.c
> --- 0.10.1/driver/ivtv-ioctl.c        2007-02-18 04:34:16.000000000 -0500
> +++ 0.10.1p/driver/ivtv-ioctl.c       2007-04-27 13:37:55.000000000 -0400
> @@ -556,8 +556,8 @@
>       /* ioctls to allow direct access to the encoder registers for testing */
>       case VIDIOC_INT_G_REGISTER:
>               IVTV_DEBUG_IOCTL("VIDIOC_INT_G_REGISTER\n");
> -             if (reg->i2c_id)
> -                     return ivtv_i2c_id(itv, reg->i2c_id, cmd, reg);
> +             if (reg->match_type == V4L2_CHIP_MATCH_I2C_DRIVER)
> +                     return ivtv_i2c_id(itv, reg->match_chip, cmd, reg);
>               return ivtv_itvc(itv, cmd, arg);
>  
>       case VIDIOC_INT_S_REGISTER:
> @@ -566,8 +566,8 @@
>               cmd = VIDIOC_INT_S_REGISTER;
>  #endif
>               IVTV_DEBUG_IOCTL("VIDIOC_INT_S_REGISTER\n");
> -             if (reg->i2c_id)
> -                     return ivtv_i2c_id(itv, reg->i2c_id, cmd, reg);
> +             if (reg->match_type == V4L2_CHIP_MATCH_I2C_DRIVER)
> +                     return ivtv_i2c_id(itv, reg->match_chip, cmd, reg);
>               return ivtv_itvc(itv, cmd, arg);
>  
>       case VIDIOC_INT_S_AUDIO_ROUTING: {
> diff -u -r 0.10.1/i2c-drivers/saa717x.c 0.10.1p/i2c-drivers/saa717x.c
> --- 0.10.1/i2c-drivers/saa717x.c      2006-11-24 08:48:32.000000000 -0500
> +++ 0.10.1p/i2c-drivers/saa717x.c     2007-04-27 14:02:55.000000000 -0400
> @@ -62,6 +62,11 @@
>  #include <linux/i2c.h>
>  #include <media/v4l2-common.h>
>  
> +#ifdef VIDIOC_DBG_S_REGISTER
> +#define VIDIOC_INT_S_REGISTER VIDIOC_DBG_S_REGISTER
> +#define VIDIOC_INT_G_REGISTER VIDIOC_DBG_G_REGISTER
> +#endif
> +
>  MODULE_DESCRIPTION("Philips SAA717x video decoder driver");
>  MODULE_AUTHOR("Kevin Thayer, K. Ohta");
>  MODULE_LICENSE("GPL");
> @@ -1257,7 +1262,7 @@
>       {
>               struct v4l2_register *reg = arg;
>  
> -             if (reg->i2c_id != I2C_DRIVERID_SAA717X)
> +             if (reg->match_type == V4L2_CHIP_MATCH_I2C_DRIVER && 
> reg->match_chip != I2C_DRIVERID_SAA717X)
>                       return -EINVAL;
>               reg->val = saa717x_read(client, reg->reg);
>               break;
> @@ -1269,7 +1274,7 @@
>               u16 addr = reg->reg & 0xffff;
>               u8 val = reg->val & 0xff;
>  
> -             if (reg->i2c_id != I2C_DRIVERID_SAA717X)
> +             if (reg->match_type == V4L2_CHIP_MATCH_I2C_DRIVER && 
> reg->match_chip != I2C_DRIVERID_SAA717X)
>                       return -EINVAL;
>               if (!capable(CAP_SYS_ADMIN))
>                       return -EPERM;
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> ivtv-devel mailing list
> [email protected]
> http://ivtvdriver.org/mailman/listinfo/ivtv-devel



_______________________________________________
ivtv-devel mailing list
[email protected]
http://ivtvdriver.org/mailman/listinfo/ivtv-devel

Reply via email to