diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2008-08-23 06:24:07 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-12 07:36:54 -0400 |
commit | 601e9444f249d219009ec05674268d90f6f1cdcb (patch) | |
tree | 42d58813872e340e03a40b74922ea89dfdcf0c55 /include/media | |
parent | e138c592b50370621653fd962b2bc3f4e25dfe78 (diff) |
V4L/DVB (8786): v4l2: remove the priv field, use dev_get_drvdata instead
Remove the priv field and let video_get/set_drvdata use dev_get_drvdata
and dev_set_drvdata instead.
Convert all drivers that still used priv directly.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include/media')
-rw-r--r-- | include/media/v4l2-dev.h | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h index 23df00919ae8..1d4df571060b 100644 --- a/include/media/v4l2-dev.h +++ b/include/media/v4l2-dev.h | |||
@@ -69,14 +69,6 @@ struct video_device | |||
69 | 69 | ||
70 | /* ioctl callbacks */ | 70 | /* ioctl callbacks */ |
71 | const struct v4l2_ioctl_ops *ioctl_ops; | 71 | const struct v4l2_ioctl_ops *ioctl_ops; |
72 | |||
73 | #ifdef OBSOLETE_DEVDATA /* to be removed soon */ | ||
74 | /* dev->driver_data will be used instead some day. | ||
75 | * Use the video_{get|set}_drvdata() helper functions, | ||
76 | * so the switch over will be transparent for you. | ||
77 | * Or use {pci|usb}_{get|set}_drvdata() directly. */ | ||
78 | void *priv; | ||
79 | #endif | ||
80 | }; | 72 | }; |
81 | 73 | ||
82 | /* Class-dev to video-device */ | 74 | /* Class-dev to video-device */ |
@@ -98,18 +90,18 @@ void video_device_release(struct video_device *vfd); | |||
98 | a dubious construction at best. */ | 90 | a dubious construction at best. */ |
99 | void video_device_release_empty(struct video_device *vfd); | 91 | void video_device_release_empty(struct video_device *vfd); |
100 | 92 | ||
101 | #ifdef OBSOLETE_DEVDATA /* to be removed soon */ | ||
102 | /* helper functions to access driver private data. */ | 93 | /* helper functions to access driver private data. */ |
103 | static inline void *video_get_drvdata(struct video_device *dev) | 94 | static inline void *video_get_drvdata(struct video_device *dev) |
104 | { | 95 | { |
105 | return dev->priv; | 96 | return dev_get_drvdata(&dev->dev); |
106 | } | 97 | } |
107 | 98 | ||
108 | static inline void video_set_drvdata(struct video_device *dev, void *data) | 99 | static inline void video_set_drvdata(struct video_device *dev, void *data) |
109 | { | 100 | { |
110 | dev->priv = data; | 101 | dev_set_drvdata(&dev->dev, data); |
111 | } | 102 | } |
112 | 103 | ||
104 | #ifdef OBSOLETE_DEVDATA /* to be removed soon */ | ||
113 | /* Obsolete stuff - Still needed for radio devices and obsolete drivers */ | 105 | /* Obsolete stuff - Still needed for radio devices and obsolete drivers */ |
114 | extern struct video_device* video_devdata(struct file*); | 106 | extern struct video_device* video_devdata(struct file*); |
115 | #endif | 107 | #endif |