aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/video4linux/v4l2-framework.txt
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2009-02-14 09:54:23 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 11:42:50 -0400
commit3a63e4492fbc7aa7f99d4368822da1382ec6fe03 (patch)
treed9d50f32757e7acde5f7ce3ecb22866b1cf51023 /Documentation/video4linux/v4l2-framework.txt
parent62cfdacc9431cad7f9093e91b17ea68d684188ae (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.txt10
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
86Registration will initialize the v4l2_device struct and link dev->driver_data 86Registration will initialize the v4l2_device struct and link dev->driver_data
87to v4l2_dev. Registration will also set v4l2_dev->name to a value derived from 87to v4l2_dev. If v4l2_dev->name is empty then it will be set to a value derived
88dev (driver name followed by the bus_id, to be precise). You may change the 88from dev (driver name followed by the bus_id, to be precise). If you set it
89name after registration if you want. 89up before calling v4l2_device_register then it will be untouched. If dev is
90NULL, then you *must* setup v4l2_dev->name before calling v4l2_device_register.
90 91
91The first 'dev' argument is normally the struct device pointer of a pci_dev, 92The first 'dev' argument is normally the struct device pointer of a pci_dev,
92usb_device or platform_device. 93usb_device or platform_device. It is rare for dev to be NULL, but it happens
94with ISA devices, for example.
93 95
94You unregister with: 96You unregister with:
95 97