summaryrefslogtreecommitdiff
path: root/include/media/v4l2-subdev.h
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@linux.intel.com>2013-12-12 09:36:46 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-05-13 13:41:44 -0300
commitb2a06aecb24329e16edc3108b8192d65ace8da75 (patch)
tree114ac342659d1e9fb598cb55bc93d158369b735b /include/media/v4l2-subdev.h
parent85de721c46ba8ad9b283b2b3e307c9a3e8425042 (diff)
[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>
Diffstat (limited to 'include/media/v4l2-subdev.h')
-rw-r--r--include/media/v4l2-subdev.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h
index ee1cb2d354a8..ee0ae769ca94 100644
--- a/include/media/v4l2-subdev.h
+++ b/include/media/v4l2-subdev.h
@@ -584,6 +584,7 @@ struct v4l2_subdev {
#endif
struct list_head list;
struct module *owner;
+ bool owner_v4l2_dev;
u32 flags;
struct v4l2_device *v4l2_dev;
const struct v4l2_subdev_ops *ops;