- 05 5月, 2011 1 次提交
-
-
由 Laurent Pinchart 提交于
If v4l2_device_register_subdev() fails, the reference to the subdev module taken by the function isn't released. Fix this. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: stable@kernel.org Acked-by: NHans Verkuil <hverkuil@xs4all.nl> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
- 23 3月, 2011 2 次提交
-
-
由 Hans Verkuil 提交于
The video_device struct has proper ref counting and its release function will be called when the last user releases it. But no such support was available for struct v4l2_device. This made it hard to determine when a USB driver can release the device if it has multiple device nodes. With one device node it is easy of course, since when the device node is released, the whole device can be released. This patch adds refcounting to v4l2_device. When registering device nodes the v4l2_device refcount will be increased, when releasing device nodes it will be decreased. The (optional) release function will be called when the last device node was released. Signed-off-by: NHans Verkuil <hverkuil@xs4all.nl> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
由 Hans Verkuil 提交于
Integrate the v4l2_prio_state into the core, ready for use. One struct v4l2_prio_state is added to v4l2_device and a pointer to a prio state is added to video_device. Signed-off-by: NHans Verkuil <hverkuil@xs4all.nl> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
- 22 3月, 2011 3 次提交
-
-
由 Laurent Pinchart 提交于
V4L2 subdevices are media entities. As such they need to inherit from (include) the media_entity structure. When registering/unregistering the subdevice, the media entity is automatically registered/unregistered. The entity is acquired on device open and released on device close. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: NSakari Ailus <sakari.ailus@iki.fi> Acked-by: NHans Verkuil <hverkuil@xs4all.nl> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
由 Laurent Pinchart 提交于
The pointer will later be used to register/unregister media entities when registering/unregistering a v4l2_subdev or a video_device. With the introduction of media devices, device drivers need to store a pointer to a driver-specific structure in the device's drvdata. v4l2_device can't claim ownership of the drvdata anymore. To maintain compatibility with drivers that rely on v4l2_device storing a pointer to itself in the device's drvdata, v4l2_device_register() will keep doing so if the drvdata is NULL. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: NHans Verkuil <hverkuil@xs4all.nl> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
由 Laurent Pinchart 提交于
Create a device node named subdevX for every registered subdev. As the device node is registered before the subdev core::s_config function is called, return -EGAIN on open until initialization completes. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: NVimarsh Zutshi <vimarsh.zutshi@gmail.com> Acked-by: NHans Verkuil <hverkuil@xs4all.nl> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
- 19 1月, 2011 2 次提交
-
-
由 Hans Verkuil 提交于
Fix a bug in v4l2_device_unregister where the sd pointer can be dereferenced after it was freed. Normally the i2c adapter is removed before this function is called. Removing the adapter will also unregister all subdevs on that adapter, so generally v4l2_device_unregister has nothing to do. However, in the case of a platform i2c bus that bus is generally not freed. In that case, after freeing the i2c subdevice the code will fall into the second block when it tests if the subdev is a SPI device. But by that time the subdev is already freed and the kernel oopses. The fix is trivial: continue with the loop after freeing the i2c or spi subdevice. Signed-off-by: NHans Verkuil <hverkuil@xs4all.nl> Reported-by: NDaniel Drake <dsd@laptop.org> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
由 Hans Verkuil 提交于
Some subdevs need to call into the board code after they are registered and have a valid struct v4l2_device pointer. The s_config op was abused for this, but now that it is removed we need a cleaner way of solving this. So this patch adds a struct with internal ops that the v4l2 core can call. Currently only two ops exist: register and unregister. Subdevs can implement these to call the board code and pass it the v4l2_device pointer, which the board code can then use to get access to the struct that embeds the v4l2_device. It is expected that in the future open and close ops will also be added. Signed-off-by: NHans Verkuil <hverkuil@xs4all.nl> Acked-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
- 02 12月, 2010 1 次提交
-
-
由 Hans Verkuil 提交于
The BKL replacement mutex had some serious performance side-effects on V4L drivers. It is replaced by a better heuristic that works around the worst of the side-effects. Read the v4l2-dev.c comments for the whole sorry story. This is a temporary measure only until we can convert all v4l drivers to use unlocked_ioctl. Signed-off-by: NHans Verkuil <hverkuil@xs4all.nl> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
- 09 8月, 2010 1 次提交
-
-
由 Hans Verkuil 提交于
Add the calls needed to automatically merge subdev controls into a bridge control handler. Hook up the control framework in __video_ioctl2 and video_register_device. Signed-off-by: NHans Verkuil <hverkuil@xs4all.nl> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
- 18 5月, 2010 1 次提交
-
-
由 Dmitri Belimov 提交于
Add support SPI bus to v4l2. Useful for control some device with SPI bus like hardware MPEG2 encoders and etc. Signed-off-by: NBeholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com> Signed-off-by: NHans Verkuil <hverkuil@xs4all.nl> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
- 17 6月, 2009 4 次提交
-
-
由 Randy Dunlap 提交于
Fix v4l2-device usage of i2c_unregister_device() and handle the case of CONFIG_I2C=m & CONFIG_MEDIA_VIDEO=y. Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
由 Randy Dunlap 提交于
Build fails when CONFIG_I2C=n, so handle that case in the if block: drivers/built-in.o: In function `v4l2_device_unregister': (.text+0x157821): undefined reference to `i2c_unregister_device' Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
由 Hans Verkuil 提交于
Until now I relied on i2c_del_adapter to unregister the i2c_clients for me, however, if the i2c bus is a platform bus then it is never deleted. So instead I need to unregister i2c clients when unregistering the v4l2_device. Signed-off-by: NHans Verkuil <hverkuil@xs4all.nl> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
由 Hans Verkuil 提交于
Add a utility function that can be used to setup the v4l2_device's name field in a standard manner. Signed-off-by: NHans Verkuil <hverkuil@xs4all.nl> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
- 30 3月, 2009 3 次提交
-
-
由 Hans Verkuil 提交于
Call v4l2_device_disconnect when the parent of a hotpluggable device disconnects. This ensures that you do not have a pointer to a device that is no longer present. Signed-off-by: NHans Verkuil <hverkuil@xs4all.nl> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
由 Hans Verkuil 提交于
Remain consistent in the naming: fields pointing to v4l2_device should be called v4l2_dev. There are too many device-like entities without adding to the confusion by mixing naming conventions. Signed-off-by: NHans Verkuil <hverkuil@xs4all.nl> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
由 Hans Verkuil 提交于
Some drivers (e.g. for ISA devices) have no parent device because there is no associated bus driver. Allow the parent device to be NULL in those cases when registering v4l2_device. Signed-off-by: NHans Verkuil <hverkuil@xs4all.nl> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
- 25 3月, 2009 1 次提交
-
-
由 Kay Sievers 提交于
Cc: mchehab@infradead.org Cc: linux-media@vger.kernel.org Acked-by: NGreg Kroah-Hartman <gregkh@suse.de> Signed-off-by: NKay Sievers <kay.sievers@vrfy.org>
-
- 08 1月, 2009 1 次提交
-
-
由 Mauro Carvalho Chehab 提交于
/home/v4l/master/v4l/v4l2-device.c:32:2: warning: Using plain integer as NULL pointer /home/v4l/master/v4l/v4l2-device.c:64:2: warning: Using plain integer as NULL pointer Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
- 30 12月, 2008 1 次提交
-
-
由 Hans Verkuil 提交于
Start implementing a proper v4l2 framework as discussed during the Linux Plumbers Conference 2008. Introduces v4l2_device (for device instances) and v4l2_subdev (representing sub-device instances). Signed-off-by: NHans Verkuil <hverkuil@xs4all.nl> Reviewed-by: NLaurent Pinchart <laurent.pinchart@skynet.be> Reviewed-by: NGuennadi Liakhovetski <g.liakhovetski@gmx.de> Reviewed-by: NAndy Walls <awalls@radix.net> Reviewed-by: NDavid Brownell <david-b@pacbell.net> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-