[media] v4l: Only get module if it's different than the driver for v4l2_dev
authorSakari Ailus <sakari.ailus@linux.intel.com>
Thu, 12 Dec 2013 12:36:46 +0000 (09:36 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Tue, 13 May 2014 16:41:44 +0000 (13:41 -0300)
commitb2a06aecb24329e16edc3108b8192d65ace8da75
tree114ac342659d1e9fb598cb55bc93d158369b735b
parent85de721c46ba8ad9b283b2b3e307c9a3e8425042
[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>
drivers/media/v4l2-core/v4l2-device.c
include/media/v4l2-subdev.h