aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/video4linux
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2009-06-19 10:32:56 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-09-18 23:19:26 -0400
commit7ae0cd9bc793e16d8d68df3c17c601732cc1d3c7 (patch)
tree6e95700b260955b91793bbc58a7d20c486e5d358 /Documentation/video4linux
parent53dacb15705901e14b03dcba27e40364fedd9d09 (diff)
V4L/DVB (12541): v4l: remove video_register_device_index
video_register_device_index is never actually called, instead the stream index number is always calculated automatically. This patch removes this function and simplifies the internal get_index function since that can now always just return the first free index. 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.txt17
1 files changed, 5 insertions, 12 deletions
diff --git a/Documentation/video4linux/v4l2-framework.txt b/Documentation/video4linux/v4l2-framework.txt
index e395a9cdc533..cb6c7eb51472 100644
--- a/Documentation/video4linux/v4l2-framework.txt
+++ b/Documentation/video4linux/v4l2-framework.txt
@@ -500,17 +500,11 @@ first free number.
500Whenever a device node is created some attributes are also created for you. 500Whenever a device node is created some attributes are also created for you.
501If you look in /sys/class/video4linux you see the devices. Go into e.g. 501If you look in /sys/class/video4linux you see the devices. Go into e.g.
502video0 and you will see 'name' and 'index' attributes. The 'name' attribute 502video0 and you will see 'name' and 'index' attributes. The 'name' attribute
503is the 'name' field of the video_device struct. The 'index' attribute is 503is the 'name' field of the video_device struct.
504a device node index that can be assigned by the driver, or that is calculated
505for you.
506
507If you call video_register_device(), then the index is just increased by
5081 for each device node you register. The first video device node you register
509always starts off with 0.
510 504
511Alternatively you can call video_register_device_index() which is identical 505The 'index' attribute is the index of the device node: for each call to
512to video_register_device(), but with an extra index argument. Here you can 506video_register_device() the index is just increased by 1. The first video
513pass a specific index value (between 0 and 31) that should be used. 507device node you register always starts with index 0.
514 508
515Users can setup udev rules that utilize the index attribute to make fancy 509Users can setup udev rules that utilize the index attribute to make fancy
516device names (e.g. 'mpegX' for MPEG video capture device nodes). 510device names (e.g. 'mpegX' for MPEG video capture device nodes).
@@ -520,8 +514,7 @@ After the device was successfully registered, then you can use these fields:
520- vfl_type: the device type passed to video_register_device. 514- vfl_type: the device type passed to video_register_device.
521- minor: the assigned device minor number. 515- minor: the assigned device minor number.
522- num: the device kernel number (i.e. the X in videoX). 516- num: the device kernel number (i.e. the X in videoX).
523- index: the device index number (calculated or set explicitly using 517- index: the device index number.
524 video_register_device_index).
525 518
526If the registration failed, then you need to call video_device_release() 519If the registration failed, then you need to call video_device_release()
527to free the allocated video_device struct, or free your own struct if the 520to free the allocated video_device struct, or free your own struct if the