summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
Diffstat (limited to 'linux')
-rw-r--r--linux/include/media/v4l2-dev.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/linux/include/media/v4l2-dev.h b/linux/include/media/v4l2-dev.h
index 8252d36ec..ba05b8164 100644
--- a/linux/include/media/v4l2-dev.h
+++ b/linux/include/media/v4l2-dev.h
@@ -100,12 +100,20 @@ void video_device_release_empty(struct video_device *vfd);
/* helper functions to access driver private data. */
static inline void *video_get_drvdata(struct video_device *dev)
{
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19)
+ return class_get_devdata(&dev->dev);
+#else
return dev_get_drvdata(&dev->dev);
+#endif
}
static inline void video_set_drvdata(struct video_device *dev, void *data)
{
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19)
+ class_set_devdata(&dev->dev, data);
+#else
dev_set_drvdata(&dev->dev, data);
+#endif
}
struct video_device *video_devdata(struct file *file);