diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2009-02-14 09:54:23 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-03-30 11:42:50 -0400 |
commit | 3a63e4492fbc7aa7f99d4368822da1382ec6fe03 (patch) | |
tree | d9d50f32757e7acde5f7ce3ecb22866b1cf51023 /Documentation/video4linux/v4l2-framework.txt | |
parent | 62cfdacc9431cad7f9093e91b17ea68d684188ae (diff) |
V4L/DVB (10643): v4l2-device: allow a NULL parent device when registering.
Some drivers (e.g. for ISA devices) have no parent device because there
is no associated bus driver. Allow the parent device to be NULL in
those cases when registering v4l2_device.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'Documentation/video4linux/v4l2-framework.txt')
-rw-r--r-- | Documentation/video4linux/v4l2-framework.txt | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Documentation/video4linux/v4l2-framework.txt b/Documentation/video4linux/v4l2-framework.txt index 48cdf86248cb..e1620e2a38ff 100644 --- a/Documentation/video4linux/v4l2-framework.txt +++ b/Documentation/video4linux/v4l2-framework.txt | |||
@@ -84,12 +84,14 @@ You must register the device instance: | |||
84 | v4l2_device_register(struct device *dev, struct v4l2_device *v4l2_dev); | 84 | v4l2_device_register(struct device *dev, struct v4l2_device *v4l2_dev); |
85 | 85 | ||
86 | Registration will initialize the v4l2_device struct and link dev->driver_data | 86 | Registration will initialize the v4l2_device struct and link dev->driver_data |
87 | to v4l2_dev. Registration will also set v4l2_dev->name to a value derived from | 87 | to v4l2_dev. If v4l2_dev->name is empty then it will be set to a value derived |
88 | dev (driver name followed by the bus_id, to be precise). You may change the | 88 | from dev (driver name followed by the bus_id, to be precise). If you set it |
89 | name after registration if you want. | 89 | up before calling v4l2_device_register then it will be untouched. If dev is |
90 | NULL, then you *must* setup v4l2_dev->name before calling v4l2_device_register. | ||
90 | 91 | ||
91 | The first 'dev' argument is normally the struct device pointer of a pci_dev, | 92 | The first 'dev' argument is normally the struct device pointer of a pci_dev, |
92 | usb_device or platform_device. | 93 | usb_device or platform_device. It is rare for dev to be NULL, but it happens |
94 | with ISA devices, for example. | ||
93 | 95 | ||
94 | You unregister with: | 96 | You unregister with: |
95 | 97 | ||