diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2008-08-11 03:39:09 +0200 |
---|---|---|
committer | Hans Verkuil <hverkuil@xs4all.nl> | 2008-08-11 03:39:09 +0200 |
commit | 59a57f6b9ea53f0ff73ec4eafbab23f2dea7221e (patch) | |
tree | 8dd8c9537a83606c1947561c87e2b2a34f0e14a5 /linux/include/media | |
parent | 2816d7977bb65f823645607fa0a052e640d518fa (diff) | |
download | mediapointer-dvb-s2-59a57f6b9ea53f0ff73ec4eafbab23f2dea7221e.tar.gz mediapointer-dvb-s2-59a57f6b9ea53f0ff73ec4eafbab23f2dea7221e.tar.bz2 |
v4l2-dev: video_get/set_drvdata needs to use class_get/set_devdata for < 2.6.19
From: Hans Verkuil <hverkuil@xs4all.nl>
Priority: normal
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/include/media')
-rw-r--r-- | linux/include/media/v4l2-dev.h | 8 |
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); |