diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2009-01-15 04:09:05 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-03-30 11:42:23 -0400 |
commit | f5360bdc5539ccd7644df7acf27e8c740ba8cf6e (patch) | |
tree | e564284e11b2b75d6b643e423062b7848ee3be86 /Documentation/video4linux | |
parent | 6ca187abb2fc1a52b2a8e0422f3ffce2e3bb7ad0 (diff) |
V4L/DVB (10252): v4l2 doc: explain why v4l2_device_unregister_subdev() has to be called.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'Documentation/video4linux')
-rw-r--r-- | Documentation/video4linux/v4l2-framework.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Documentation/video4linux/v4l2-framework.txt b/Documentation/video4linux/v4l2-framework.txt index ff124374e9ba..cc350624237d 100644 --- a/Documentation/video4linux/v4l2-framework.txt +++ b/Documentation/video4linux/v4l2-framework.txt | |||
@@ -340,6 +340,12 @@ Make sure to call v4l2_device_unregister_subdev(sd) when the remove() callback | |||
340 | is called. This will unregister the sub-device from the bridge driver. It is | 340 | is called. This will unregister the sub-device from the bridge driver. It is |
341 | safe to call this even if the sub-device was never registered. | 341 | safe to call this even if the sub-device was never registered. |
342 | 342 | ||
343 | You need to do this because when the bridge driver destroys the i2c adapter | ||
344 | the remove() callbacks are called of the i2c devices on that adapter. | ||
345 | After that the corresponding v4l2_subdev structures are invalid, so they | ||
346 | have to be unregistered first. Calling v4l2_device_unregister_subdev(sd) | ||
347 | from the remove() callback ensures that this is always done correctly. | ||
348 | |||
343 | 349 | ||
344 | The bridge driver also has some helper functions it can use: | 350 | The bridge driver also has some helper functions it can use: |
345 | 351 | ||