]> git.baikalelectronics.ru Git - kernel.git/commit
media: uvcvideo: Convert from using an atomic variable to a reference count
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Tue, 8 Aug 2017 12:56:23 +0000 (08:56 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Sun, 20 Aug 2017 12:09:32 +0000 (08:09 -0400)
commit88784060a226181e32a6ea4db8147e31cad162f0
treeae5c95757ab996083c78c45887c91f75ec62e5fb
parentd34b406d42135a02c5237bf3e1be9623d02cde09
media: uvcvideo: Convert from using an atomic variable to a reference count

When adding support for metadata nodes, we'll have to keep video
devices registered until all metadata nodes are closed too. Since
this has nothing to do with stream counting, replace the nstreams
atomic variable with a reference counter.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/usb/uvc/uvc_driver.c
drivers/media/usb/uvc/uvcvideo.h