diff options
author | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-08-30 18:16:25 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-09-09 08:41:12 -0400 |
commit | 65d7aba0d3c32fc686fe19e146b8cd8a0a87952d (patch) | |
tree | 72c721a36db68a31c7fb10ba63a6c7790afbb4dc /include/media | |
parent | daf3a4f751d3d08ebee539aab991e8d94cd1a01e (diff) |
[media] v4l2-device.h: fix some doc tags
Fix some minor issues at the documentation tags on this file,
adding cross-references where needed, and fixing some broken
ones.
While here, fix a few spaces before tabs to make Checkpatch happier.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'include/media')
-rw-r--r-- | include/media/v4l2-device.h | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/include/media/v4l2-device.h b/include/media/v4l2-device.h index a9d6aa41790e..8ffa94009d1a 100644 --- a/include/media/v4l2-device.h +++ b/include/media/v4l2-device.h | |||
@@ -39,7 +39,7 @@ struct v4l2_ctrl_handler; | |||
39 | * if this struct is embedded into a larger struct. | 39 | * if this struct is embedded into a larger struct. |
40 | * @name: unique device name, by default the driver name + bus ID | 40 | * @name: unique device name, by default the driver name + bus ID |
41 | * @notify: notify callback called by some sub-devices. | 41 | * @notify: notify callback called by some sub-devices. |
42 | * @ctrl_handler: The control handler. May be NULL. | 42 | * @ctrl_handler: The control handler. May be %NULL. |
43 | * @prio: Device's priority state | 43 | * @prio: Device's priority state |
44 | * @ref: Keep track of the references to this struct. | 44 | * @ref: Keep track of the references to this struct. |
45 | * @release: Release function that is called when the ref count | 45 | * @release: Release function that is called when the ref count |
@@ -53,8 +53,8 @@ struct v4l2_ctrl_handler; | |||
53 | * | 53 | * |
54 | * .. note:: | 54 | * .. note:: |
55 | * | 55 | * |
56 | * #) dev->driver_data points to this struct. | 56 | * #) @dev->driver_data points to this struct. |
57 | * #) dev might be NULL if there is no parent device | 57 | * #) @dev might be %NULL if there is no parent device |
58 | */ | 58 | */ |
59 | 59 | ||
60 | struct v4l2_device { | 60 | struct v4l2_device { |
@@ -76,10 +76,10 @@ struct v4l2_device { | |||
76 | /** | 76 | /** |
77 | * v4l2_device_get - gets a V4L2 device reference | 77 | * v4l2_device_get - gets a V4L2 device reference |
78 | * | 78 | * |
79 | * @v4l2_dev: pointer to struct v4l2_device | 79 | * @v4l2_dev: pointer to struct &v4l2_device |
80 | * | 80 | * |
81 | * This is an ancillary routine meant to increment the usage for the | 81 | * This is an ancillary routine meant to increment the usage for the |
82 | * struct v4l2_device pointed by @v4l2_dev. | 82 | * struct &v4l2_device pointed by @v4l2_dev. |
83 | */ | 83 | */ |
84 | static inline void v4l2_device_get(struct v4l2_device *v4l2_dev) | 84 | static inline void v4l2_device_get(struct v4l2_device *v4l2_dev) |
85 | { | 85 | { |
@@ -89,23 +89,23 @@ static inline void v4l2_device_get(struct v4l2_device *v4l2_dev) | |||
89 | /** | 89 | /** |
90 | * v4l2_device_put - putss a V4L2 device reference | 90 | * v4l2_device_put - putss a V4L2 device reference |
91 | * | 91 | * |
92 | * @v4l2_dev: pointer to struct v4l2_device | 92 | * @v4l2_dev: pointer to struct &v4l2_device |
93 | * | 93 | * |
94 | * This is an ancillary routine meant to decrement the usage for the | 94 | * This is an ancillary routine meant to decrement the usage for the |
95 | * struct v4l2_device pointed by @v4l2_dev. | 95 | * struct &v4l2_device pointed by @v4l2_dev. |
96 | */ | 96 | */ |
97 | int v4l2_device_put(struct v4l2_device *v4l2_dev); | 97 | int v4l2_device_put(struct v4l2_device *v4l2_dev); |
98 | 98 | ||
99 | /** | 99 | /** |
100 | * v4l2_device_register -Initialize v4l2_dev and make dev->driver_data | 100 | * v4l2_device_register - Initialize v4l2_dev and make @dev->driver_data |
101 | * point to v4l2_dev. | 101 | * point to @v4l2_dev. |
102 | * | 102 | * |
103 | * @dev: pointer to struct device | 103 | * @dev: pointer to struct &device |
104 | * @v4l2_dev: pointer to struct v4l2_device | 104 | * @v4l2_dev: pointer to struct &v4l2_device |
105 | * | 105 | * |
106 | * .. note:: | 106 | * .. note:: |
107 | * dev may be NULL in rare cases (ISA devices). | 107 | * @dev may be %NULL in rare cases (ISA devices). |
108 | * In such case the caller must fill in the v4l2_dev->name field | 108 | * In such case the caller must fill in the @v4l2_dev->name field |
109 | * before calling this function. | 109 | * before calling this function. |
110 | */ | 110 | */ |
111 | int __must_check v4l2_device_register(struct device *dev, | 111 | int __must_check v4l2_device_register(struct device *dev, |
@@ -113,14 +113,14 @@ int __must_check v4l2_device_register(struct device *dev, | |||
113 | 113 | ||
114 | /** | 114 | /** |
115 | * v4l2_device_set_name - Optional function to initialize the | 115 | * v4l2_device_set_name - Optional function to initialize the |
116 | * name field of struct v4l2_device | 116 | * name field of struct &v4l2_device |
117 | * | 117 | * |
118 | * @v4l2_dev: pointer to struct v4l2_device | 118 | * @v4l2_dev: pointer to struct &v4l2_device |
119 | * @basename: base name for the device name | 119 | * @basename: base name for the device name |
120 | * @instance: pointer to a static atomic_t var with the instance usage for | 120 | * @instance: pointer to a static atomic_t var with the instance usage for |
121 | * the device driver. | 121 | * the device driver. |
122 | * | 122 | * |
123 | * v4l2_device_set_name() initializes the name field of struct v4l2_device | 123 | * v4l2_device_set_name() initializes the name field of struct &v4l2_device |
124 | * using the driver name and a driver-global atomic_t instance. | 124 | * using the driver name and a driver-global atomic_t instance. |
125 | * | 125 | * |
126 | * This function will increment the instance counter and returns the | 126 | * This function will increment the instance counter and returns the |
@@ -132,7 +132,7 @@ int __must_check v4l2_device_register(struct device *dev, | |||
132 | * | 132 | * |
133 | * ... | 133 | * ... |
134 | * | 134 | * |
135 | * instance = v4l2_device_set_name(&v4l2_dev, "foo", &drv_instance); | 135 | * instance = v4l2_device_set_name(&\ v4l2_dev, "foo", &\ drv_instance); |
136 | * | 136 | * |
137 | * The first time this is called the name field will be set to foo0 and | 137 | * The first time this is called the name field will be set to foo0 and |
138 | * this function returns 0. If the name ends with a digit (e.g. cx18), | 138 | * this function returns 0. If the name ends with a digit (e.g. cx18), |
@@ -147,16 +147,16 @@ int v4l2_device_set_name(struct v4l2_device *v4l2_dev, const char *basename, | |||
147 | * @v4l2_dev: pointer to struct v4l2_device | 147 | * @v4l2_dev: pointer to struct v4l2_device |
148 | * | 148 | * |
149 | * Should be called when the USB parent disconnects. | 149 | * Should be called when the USB parent disconnects. |
150 | * Since the parent disappears, this ensures that v4l2_dev doesn't have | 150 | * Since the parent disappears, this ensures that @v4l2_dev doesn't have |
151 | * an invalid parent pointer. | 151 | * an invalid parent pointer. |
152 | * | 152 | * |
153 | * .. note:: This function sets v4l2_dev->dev to NULL. | 153 | * .. note:: This function sets @v4l2_dev->dev to NULL. |
154 | */ | 154 | */ |
155 | void v4l2_device_disconnect(struct v4l2_device *v4l2_dev); | 155 | void v4l2_device_disconnect(struct v4l2_device *v4l2_dev); |
156 | 156 | ||
157 | /** | 157 | /** |
158 | * v4l2_device_unregister - Unregister all sub-devices and any other | 158 | * v4l2_device_unregister - Unregister all sub-devices and any other |
159 | * resources related to v4l2_dev. | 159 | * resources related to @v4l2_dev. |
160 | * | 160 | * |
161 | * @v4l2_dev: pointer to struct v4l2_device | 161 | * @v4l2_dev: pointer to struct v4l2_device |
162 | */ | 162 | */ |
@@ -165,8 +165,8 @@ void v4l2_device_unregister(struct v4l2_device *v4l2_dev); | |||
165 | /** | 165 | /** |
166 | * v4l2_device_register_subdev - Registers a subdev with a v4l2 device. | 166 | * v4l2_device_register_subdev - Registers a subdev with a v4l2 device. |
167 | * | 167 | * |
168 | * @v4l2_dev: pointer to struct v4l2_device | 168 | * @v4l2_dev: pointer to struct &v4l2_device |
169 | * @sd: pointer to struct v4l2_subdev | 169 | * @sd: pointer to struct &v4l2_subdev |
170 | * | 170 | * |
171 | * While registered, the subdev module is marked as in-use. | 171 | * While registered, the subdev module is marked as in-use. |
172 | * | 172 | * |
@@ -179,7 +179,7 @@ int __must_check v4l2_device_register_subdev(struct v4l2_device *v4l2_dev, | |||
179 | /** | 179 | /** |
180 | * v4l2_device_unregister_subdev - Unregisters a subdev with a v4l2 device. | 180 | * v4l2_device_unregister_subdev - Unregisters a subdev with a v4l2 device. |
181 | * | 181 | * |
182 | * @sd: pointer to struct v4l2_subdev | 182 | * @sd: pointer to struct &v4l2_subdev |
183 | * | 183 | * |
184 | * .. note :: | 184 | * .. note :: |
185 | * | 185 | * |
@@ -191,7 +191,7 @@ void v4l2_device_unregister_subdev(struct v4l2_subdev *sd); | |||
191 | /** | 191 | /** |
192 | * v4l2_device_register_subdev_nodes - Registers device nodes for all subdevs | 192 | * v4l2_device_register_subdev_nodes - Registers device nodes for all subdevs |
193 | * of the v4l2 device that are marked with | 193 | * of the v4l2 device that are marked with |
194 | * the V4L2_SUBDEV_FL_HAS_DEVNODE flag. | 194 | * the %V4L2_SUBDEV_FL_HAS_DEVNODE flag. |
195 | * | 195 | * |
196 | * @v4l2_dev: pointer to struct v4l2_device | 196 | * @v4l2_dev: pointer to struct v4l2_device |
197 | */ | 197 | */ |
@@ -201,9 +201,9 @@ v4l2_device_register_subdev_nodes(struct v4l2_device *v4l2_dev); | |||
201 | /** | 201 | /** |
202 | * v4l2_subdev_notify - Sends a notification to v4l2_device. | 202 | * v4l2_subdev_notify - Sends a notification to v4l2_device. |
203 | * | 203 | * |
204 | * @sd: pointer to struct v4l2_subdev | 204 | * @sd: pointer to struct &v4l2_subdev |
205 | * @notification: type of notification. Please notice that the notification | 205 | * @notification: type of notification. Please notice that the notification |
206 | * type is driver-specific. | 206 | * type is driver-specific. |
207 | * @arg: arguments for the notification. Those are specific to each | 207 | * @arg: arguments for the notification. Those are specific to each |
208 | * notification type. | 208 | * notification type. |
209 | */ | 209 | */ |
@@ -222,7 +222,7 @@ static inline void v4l2_subdev_notify(struct v4l2_subdev *sd, | |||
222 | Ignore any errors. Note that you cannot add or delete a subdev | 222 | Ignore any errors. Note that you cannot add or delete a subdev |
223 | while walking the subdevs list. */ | 223 | while walking the subdevs list. */ |
224 | #define __v4l2_device_call_subdevs_p(v4l2_dev, sd, cond, o, f, args...) \ | 224 | #define __v4l2_device_call_subdevs_p(v4l2_dev, sd, cond, o, f, args...) \ |
225 | do { \ | 225 | do { \ |
226 | list_for_each_entry((sd), &(v4l2_dev)->subdevs, list) \ | 226 | list_for_each_entry((sd), &(v4l2_dev)->subdevs, list) \ |
227 | if ((cond) && (sd)->ops->o && (sd)->ops->o->f) \ | 227 | if ((cond) && (sd)->ops->o && (sd)->ops->o->f) \ |
228 | (sd)->ops->o->f((sd) , ##args); \ | 228 | (sd)->ops->o->f((sd) , ##args); \ |
@@ -241,15 +241,15 @@ static inline void v4l2_subdev_notify(struct v4l2_subdev *sd, | |||
241 | return with that error code. Note that you cannot add or delete a | 241 | return with that error code. Note that you cannot add or delete a |
242 | subdev while walking the subdevs list. */ | 242 | subdev while walking the subdevs list. */ |
243 | #define __v4l2_device_call_subdevs_until_err_p(v4l2_dev, sd, cond, o, f, args...) \ | 243 | #define __v4l2_device_call_subdevs_until_err_p(v4l2_dev, sd, cond, o, f, args...) \ |
244 | ({ \ | 244 | ({ \ |
245 | long __err = 0; \ | 245 | long __err = 0; \ |
246 | \ | 246 | \ |
247 | list_for_each_entry((sd), &(v4l2_dev)->subdevs, list) { \ | 247 | list_for_each_entry((sd), &(v4l2_dev)->subdevs, list) { \ |
248 | if ((cond) && (sd)->ops->o && (sd)->ops->o->f) \ | 248 | if ((cond) && (sd)->ops->o && (sd)->ops->o->f) \ |
249 | __err = (sd)->ops->o->f((sd) , ##args); \ | 249 | __err = (sd)->ops->o->f((sd) , ##args); \ |
250 | if (__err && __err != -ENOIOCTLCMD) \ | 250 | if (__err && __err != -ENOIOCTLCMD) \ |
251 | break; \ | 251 | break; \ |
252 | } \ | 252 | } \ |
253 | (__err == -ENOIOCTLCMD) ? 0 : __err; \ | 253 | (__err == -ENOIOCTLCMD) ? 0 : __err; \ |
254 | }) | 254 | }) |
255 | 255 | ||
@@ -276,7 +276,7 @@ static inline void v4l2_subdev_notify(struct v4l2_subdev *sd, | |||
276 | match them all). If the callback returns an error other than 0 or | 276 | match them all). If the callback returns an error other than 0 or |
277 | -ENOIOCTLCMD, then return with that error code. Note that you cannot | 277 | -ENOIOCTLCMD, then return with that error code. Note that you cannot |
278 | add or delete a subdev while walking the subdevs list. */ | 278 | add or delete a subdev while walking the subdevs list. */ |
279 | #define v4l2_device_call_until_err(v4l2_dev, grpid, o, f, args...) \ | 279 | #define v4l2_device_call_until_err(v4l2_dev, grpid, o, f, args...) \ |
280 | ({ \ | 280 | ({ \ |
281 | struct v4l2_subdev *__sd; \ | 281 | struct v4l2_subdev *__sd; \ |
282 | __v4l2_device_call_subdevs_until_err_p(v4l2_dev, __sd, \ | 282 | __v4l2_device_call_subdevs_until_err_p(v4l2_dev, __sd, \ |
@@ -300,8 +300,8 @@ static inline void v4l2_subdev_notify(struct v4l2_subdev *sd, | |||
300 | 300 | ||
301 | /* | 301 | /* |
302 | * Call the specified callback for all subdevs where grp_id & grpmsk != 0 | 302 | * Call the specified callback for all subdevs where grp_id & grpmsk != 0 |
303 | * (if grpmsk == `0, then match them all). If the callback returns an error | 303 | * (if grpmsk == 0, then match them all). If the callback returns an error |
304 | * other than 0 or -ENOIOCTLCMD, then return with that error code. Note that | 304 | * other than 0 or %-ENOIOCTLCMD, then return with that error code. Note that |
305 | * you cannot add or delete a subdev while walking the subdevs list. | 305 | * you cannot add or delete a subdev while walking the subdevs list. |
306 | */ | 306 | */ |
307 | #define v4l2_device_mask_call_until_err(v4l2_dev, grpmsk, o, f, args...) \ | 307 | #define v4l2_device_mask_call_until_err(v4l2_dev, grpmsk, o, f, args...) \ |