diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2009-05-02 09:12:50 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-06-16 17:20:50 -0400 |
commit | 102e78136446faca7d7d241b628c5bd0e0d61d5d (patch) | |
tree | 17f26a5fc1aa4bab59d38a80c2684af21e37d53e /Documentation | |
parent | 416a7aa88300601d6630736836f9798c4079bc16 (diff) |
V4L/DVB (11671): v4l2: add v4l2_device_set_name()
Add a utility function that can be used to setup the v4l2_device's name
field in a standard manner.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/video4linux/v4l2-framework.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Documentation/video4linux/v4l2-framework.txt b/Documentation/video4linux/v4l2-framework.txt index 854808b67fae..d54c1e4c6a9c 100644 --- a/Documentation/video4linux/v4l2-framework.txt +++ b/Documentation/video4linux/v4l2-framework.txt | |||
@@ -89,6 +89,11 @@ from dev (driver name followed by the bus_id, to be precise). If you set it | |||
89 | up before calling v4l2_device_register then it will be untouched. If dev is | 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 | NULL, then you *must* setup v4l2_dev->name before calling v4l2_device_register. |
91 | 91 | ||
92 | You can use v4l2_device_set_name() to set the name based on a driver name and | ||
93 | a driver-global atomic_t instance. This will generate names like ivtv0, ivtv1, | ||
94 | etc. If the name ends with a digit, then it will insert a dash: cx18-0, | ||
95 | cx18-1, etc. This function returns the instance number. | ||
96 | |||
92 | The first 'dev' argument is normally the struct device pointer of a pci_dev, | 97 | The first 'dev' argument is normally the struct device pointer of a pci_dev, |
93 | usb_interface or platform_device. It is rare for dev to be NULL, but it happens | 98 | usb_interface or platform_device. It is rare for dev to be NULL, but it happens |
94 | with ISA devices or when one device creates multiple PCI devices, thus making | 99 | with ISA devices or when one device creates multiple PCI devices, thus making |