summaryrefslogtreecommitdiff
path: root/linux/Documentation/video4linux/v4l2-framework.txt
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-05-02 15:12:50 +0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-05-02 15:12:50 +0200
commit79d2addf97397ee580b80f71343cf72b03da65a2 (patch)
tree3659369523acd92f172a36132f559078d2800a74 /linux/Documentation/video4linux/v4l2-framework.txt
parent83d87c0c4e7849713db298cea21c964f85313f3b (diff)
downloadmediapointer-dvb-s2-79d2addf97397ee580b80f71343cf72b03da65a2.tar.gz
mediapointer-dvb-s2-79d2addf97397ee580b80f71343cf72b03da65a2.tar.bz2
v4l2: add v4l2_device_set_name()
From: Hans Verkuil <hverkuil@xs4all.nl> Add a utility function that can be used to setup the v4l2_device's name field in a standard manner. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/Documentation/video4linux/v4l2-framework.txt')
-rw-r--r--linux/Documentation/video4linux/v4l2-framework.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/linux/Documentation/video4linux/v4l2-framework.txt b/linux/Documentation/video4linux/v4l2-framework.txt
index 854808b67..d54c1e4c6 100644
--- a/linux/Documentation/video4linux/v4l2-framework.txt
+++ b/linux/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
up before calling v4l2_device_register then it will be untouched. If dev is
NULL, then you *must* setup v4l2_dev->name before calling v4l2_device_register.
+You can use v4l2_device_set_name() to set the name based on a driver name and
+a driver-global atomic_t instance. This will generate names like ivtv0, ivtv1,
+etc. If the name ends with a digit, then it will insert a dash: cx18-0,
+cx18-1, etc. This function returns the instance number.
+
The first 'dev' argument is normally the struct device pointer of a pci_dev,
usb_interface or platform_device. It is rare for dev to be NULL, but it happens
with ISA devices or when one device creates multiple PCI devices, thus making