> > 
> > There is a problem : it compile if I don't use the
> 2
> > macros (that is, put the lines you gave directly)
> :
> > uvc_status.c:18:5: warning: "LINUX_VERSION_CODE"
> is
> > not defined
> > uvc_status.c:18:26: warning: "KERNEL_VERSION" is
> not
> > defined
> > then compilation fails of course.
> > Are they supposed to be known in bash ?
> > echo $KERNEL_VERSION
> > -> gives nothing
> > I use Mandriva 2007.0
> 
> My bad. Here's an updated patch.
> 
> Best regards,
> 
> Laurent Pinchart
> > Index: uvc_status.c
>
===================================================================
> --- uvc_status.c      (revision 199)
> +++ uvc_status.c      (working copy)
> @@ -12,9 +12,14 @@
>   */
>  
>  #include <linux/kernel.h>
> +#include <linux/version.h>
>  #include <linux/input.h>
>  #include <linux/usb.h>
> +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
> +#include <linux/usb_input.h>
> +#else
>  #include <linux/usb/input.h>
> +#endif
>  
>  #include "uvcvideo.h"
>  
> @@ -43,7 +48,11 @@
>       input->name = dev->name;
>       input->phys = phys;
>       usb_to_input_id(udev, &input->id);
> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
>       input->dev.parent = &dev->intf->dev;
> +#else
> +     input->cdev.dev = &dev->intf->dev;
> +#endif
>  
>       set_bit(EV_KEY, input->evbit);
>       set_bit(BTN_0, input->keybit);
> 

It compiles ok now. And I have learn a few things :)


      
_____________________________________________________________________________ 
Envoyez avec Yahoo! Mail. Une boite mail plus intelligente http://mail.yahoo.fr
_______________________________________________
Linux-uvc-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel

Reply via email to