The patch number 8792 was added via Hans Verkuil <[EMAIL PROTECTED]>
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
        [EMAIL PROTECTED]

------

From: Hans Verkuil  <[EMAIL PROTECTED]>
v4l2-dev: video_get/set_drvdata needs to use class_get/set_devdata for < 2.6.19


Priority: normal

Signed-off-by: Hans Verkuil <[EMAIL PROTECTED]>


---

 linux/include/media/v4l2-dev.h |    8 ++++++++
 1 file changed, 8 insertions(+)

diff -r 277e92473efa -r 395629694b55 linux/include/media/v4l2-dev.h
--- a/linux/include/media/v4l2-dev.h    Sun Aug 24 16:18:47 2008 +0200
+++ b/linux/include/media/v4l2-dev.h    Mon Aug 11 03:39:09 2008 +0200
@@ -100,12 +100,20 @@ void video_device_release_empty(struct v
 /* 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);


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/395629694b55defcc6311bfbac23e82e043fe307

_______________________________________________
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to