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)
commit9d15cd958c172c8b02da6ee28638ccbbf7933175
treeae5c95757ab996083c78c45887c91f75ec62e5fb
parentdfa6f2400c1f0bb2183996ac1c74f1fc859fca32
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