]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/blobdiff - Documentation/video4linux/v4l2-framework.txt
V4L/DVB (10643): v4l2-device: allow a NULL parent device when registering.
[mirror_ubuntu-focal-kernel.git] / Documentation / video4linux / v4l2-framework.txt
index 48cdf86248cbe9d9e43547ec6c3f647112147916..e1620e2a38ff0c7bdba70501f41d8d22175caf73 100644 (file)
@@ -84,12 +84,14 @@ You must register the device instance:
        v4l2_device_register(struct device *dev, struct v4l2_device *v4l2_dev);
 
 Registration will initialize the v4l2_device struct and link dev->driver_data
-to v4l2_dev. Registration will also set v4l2_dev->name to a value derived from
-dev (driver name followed by the bus_id, to be precise). You may change the
-name after registration if you want.
+to v4l2_dev. If v4l2_dev->name is empty then it will be set to a value derived
+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.
 
 The first 'dev' argument is normally the struct device pointer of a pci_dev,
-usb_device or platform_device.
+usb_device or platform_device. It is rare for dev to be NULL, but it happens
+with ISA devices, for example.
 
 You unregister with: