Index: trunk/driver/stk11xx-usb.c =================================================================== --- trunk/driver/stk11xx-usb.c (revision 78) +++ trunk/driver/stk11xx-usb.c (revision 79) @@ -38,6 +38,9 @@ #include <linux/errno.h> #include <linux/slab.h> #include <linux/kref.h> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27) +#include <linux/mm.h> +#endif #include <linux/usb.h> #include <media/v4l2-common.h> Index: trunk/driver/stk11xx-v4l.c =================================================================== --- trunk/driver/stk11xx-v4l.c (revision 78) +++ trunk/driver/stk11xx-v4l.c (revision 79) @@ -39,7 +39,12 @@ #include <linux/slab.h> #include <linux/kref.h> #include <linux/vmalloc.h> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27) +#include <linux/mm.h> +#include <linux/videodev.h> +#endif + #include <linux/usb.h> #include <media/v4l2-common.h> @@ -1657,9 +1662,14 @@ strcpy(dev->vdev->name, DRIVER_DESC); +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27) dev->vdev->dev = &dev->interface->dev; dev->vdev->owner = THIS_MODULE; dev->vdev->type = VID_TYPE_CAPTURE; +#else + dev->vdev->dev = dev->interface->dev; +#endif + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24) dev->vdev->hardware = VID_HARDWARE_STK11XX; #endif Index: trunk/driver/stk11xx-sysfs.c =================================================================== --- trunk/driver/stk11xx-sysfs.c (revision 78) +++ trunk/driver/stk11xx-sysfs.c (revision 79) @@ -39,7 +39,12 @@ #include <linux/slab.h> #include <linux/kref.h> #include <linux/device.h> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27) +#include <linux/mm.h> +#include <linux/videodev.h> +#endif + #include <linux/usb.h> #include <media/v4l2-common.h> @@ -588,7 +593,7 @@ ret = video_device_create_file(vdev, &class_device_attr_colour); ret = video_device_create_file(vdev, &class_device_attr_hflip); ret = video_device_create_file(vdev, &class_device_attr_vflip); -#else +#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27) ret = video_device_create_file(vdev, &dev_attr_release); ret = video_device_create_file(vdev, &dev_attr_videostatus); ret = video_device_create_file(vdev, &dev_attr_informations); @@ -599,8 +604,20 @@ ret = video_device_create_file(vdev, &dev_attr_colour); ret = video_device_create_file(vdev, &dev_attr_hflip); ret = video_device_create_file(vdev, &dev_attr_vflip); +#else + ret = device_create_file(&vdev->dev, &dev_attr_release); + ret = device_create_file(&vdev->dev, &dev_attr_videostatus); + ret = device_create_file(&vdev->dev, &dev_attr_informations); + ret = device_create_file(&vdev->dev, &dev_attr_fps); + ret = device_create_file(&vdev->dev, &dev_attr_brightness); + ret = device_create_file(&vdev->dev, &dev_attr_contrast); + ret = device_create_file(&vdev->dev, &dev_attr_whitebalance); + ret = device_create_file(&vdev->dev, &dev_attr_colour); + ret = device_create_file(&vdev->dev, &dev_attr_hflip); + ret = device_create_file(&vdev->dev, &dev_attr_vflip); #endif + return ret; } @@ -627,7 +644,7 @@ video_device_remove_file(vdev, &class_device_attr_colour); video_device_remove_file(vdev, &class_device_attr_hflip); video_device_remove_file(vdev, &class_device_attr_vflip); -#else +#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27) video_device_remove_file(vdev, &dev_attr_release); video_device_remove_file(vdev, &dev_attr_videostatus); video_device_remove_file(vdev, &dev_attr_informations); @@ -638,6 +655,18 @@ video_device_remove_file(vdev, &dev_attr_colour); video_device_remove_file(vdev, &dev_attr_hflip); video_device_remove_file(vdev, &dev_attr_vflip); +#else + device_remove_file(&vdev->dev, &dev_attr_release); + device_remove_file(&vdev->dev, &dev_attr_videostatus); + device_remove_file(&vdev->dev, &dev_attr_informations); + device_remove_file(&vdev->dev, &dev_attr_fps); + device_remove_file(&vdev->dev, &dev_attr_brightness); + device_remove_file(&vdev->dev, &dev_attr_contrast); + device_remove_file(&vdev->dev, &dev_attr_whitebalance); + device_remove_file(&vdev->dev, &dev_attr_colour); + device_remove_file(&vdev->dev, &dev_attr_hflip); + device_remove_file(&vdev->dev, &dev_attr_vflip); #endif + } Index: trunk/driver/stk11xx-buf.c =================================================================== --- trunk/driver/stk11xx-buf.c (revision 78) +++ trunk/driver/stk11xx-buf.c (revision 79) @@ -39,6 +39,9 @@ #include <linux/slab.h> #include <linux/kref.h> #include <linux/vmalloc.h> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27) +#include <linux/mm.h> +#endif #include <linux/usb.h> #include <media/v4l2-common.h>