]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - Documentation/video4linux/v4l2-framework.txt
V4L/DVB (11373): v4l2-common: add explicit v4l2_device pointer as first arg to new_...
[linux-2.6-omap-h63xx.git] / Documentation / video4linux / v4l2-framework.txt
index c9ae70a37a6c10cc75e060ed420ed64f90a7b2b3..854808b67faed03f209291ae2947be5f051e8af6 100644 (file)
@@ -364,14 +364,12 @@ from the remove() callback ensures that this is always done correctly.
 
 The bridge driver also has some helper functions it can use:
 
-struct v4l2_subdev *sd = v4l2_i2c_new_subdev(adapter, "module_foo", "chipid", 0x36);
+struct v4l2_subdev *sd = v4l2_i2c_new_subdev(v4l2_dev, adapter,
+              "module_foo", "chipid", 0x36);
 
 This loads the given module (can be NULL if no module needs to be loaded) and
 calls i2c_new_device() with the given i2c_adapter and chip/address arguments.
-If all goes well, then it registers the subdev with the v4l2_device. It gets
-the v4l2_device by calling i2c_get_adapdata(adapter), so you should make sure
-to call i2c_set_adapdata(adapter, v4l2_device) when you setup the i2c_adapter
-in your driver.
+If all goes well, then it registers the subdev with the v4l2_device.
 
 You can also use v4l2_i2c_new_probed_subdev() which is very similar to
 v4l2_i2c_new_subdev(), except that it has an array of possible I2C addresses