[go: nahoru, domu]

History log of /drivers/media/v4l2-core/v4l2-device.c
Revision Date Author Comments
b2a06aecb24329e16edc3108b8192d65ace8da75 12-Dec-2013 Sakari Ailus <sakari.ailus@linux.intel.com> [media] v4l: Only get module if it's different than the driver for v4l2_dev

When the sub-device is registered, increment the use count of the sub-device
owner only if it's different from the owner of the driver for the media
device. This avoids increasing the use count by the module itself and thus
making it possible to unload it when it's not in use.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9e882e3bc97c7774b93f3db483d2e75767b5cad1 12-Jun-2013 Hans Verkuil <hans.verkuil@cisco.com> [media] v4l2-device: check if already unregistered

It was possible to unregister an already unregistered v4l2_device struct.
Add a check whether that already happened and just return if that was
the case.
Also refuse to register a v4l2_device if both the dev and name fields are
empty. A warning was already produced in that case, but since the name field
is now used to detect whether or not the v4l2_device was already unregistered
this particular combination should be rejected.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
c2efd3e6e04942aa8206ca26c855eabf67cfdbc0 09-May-2013 Sylwester Nawrocki <s.nawrocki@samsung.com> [media] V4L: Remove all links of the media entity when unregistering subdev

Remove all links of the subdev's media entity after internal_ops
'unregistered' call and right before unregistering the entity from
a media device.
It is assumed here that an unregistered (orphan) media entity cannot
have links to other entities registered to a media device.
It is also assumed the media links should be created/removed with
the media graph's mutex held.
The above implies that the caller of v4l2_device_unregister_subdev()
must not hold the graph's mutex.

Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
7b34be71db533f3e0cf93d53cf62d036cdb5418a 20-Jan-2013 Peter Senna Tschudin <peter.senna@gmail.com> [media] use IS_ENABLED() macro

This patch introduces the use of IS_ENABLED() macro. For example,
replacing:
#if defined(CONFIG_I2C) || (defined(CONFIG_I2C_MODULE) && defined(MODULE))
with:
#if IS_ENABLED(CONFIG_I2C)
All changes made by this patch respect the same replacement pattern.

Reported-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Acked-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
317efce991620adc589b3005b9baed433dcb2a56 25-Nov-2012 Laurent Pinchart <laurent.pinchart@ideasonboard.com> [media] v4l: Reset subdev v4l2_dev field to NULL if registration fails

When subdev registration fails the subdev v4l2_dev field is left to a
non-NULL value. Later calls to v4l2_device_unregister_subdev() will
consider the subdev as registered and will module_put() the subdev
module without any matching module_get().
Fix this by setting the subdev v4l2_dev field to NULL in
v4l2_device_register_subdev() when the function fails.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: stable@vger.kernel.org
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
34a6b7d093d8fe738ada191b36648d00bc18b7eb 14-Sep-2012 Hans Verkuil <hans.verkuil@cisco.com> [media] v4l2-ctrls: add a filter function to v4l2_ctrl_add_handler

With a filter function you can control more precisely which controls
are added. This is useful in particular for radio device nodes for
combined TV/Radio cards where you want to show just the radio-specific
controls and not controls like brightness.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
5bc3cb743bbab408792c1b4ef31adf6268aa4b7e 14-Jun-2012 Mauro Carvalho Chehab <mchehab@redhat.com> [media] v4l: move v4l2 core into a separate directory

Currently, the v4l2 core is mixed together with other non-core drivers.
Move them into a separate directory.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>