summaryrefslogtreecommitdiffstats
path: root/include/media/v4l2-subdev.h
diff options
context:
space:
mode:
authorSakari Ailus2013-12-12 13:36:46 +0100
committerMauro Carvalho Chehab2014-05-13 18:41:44 +0200
commitb2a06aecb24329e16edc3108b8192d65ace8da75 (patch)
tree114ac342659d1e9fb598cb55bc93d158369b735b /include/media/v4l2-subdev.h
parent[media] media: Use a better owner for the media device (diff)
downloadkernel-qcow2-linux-b2a06aecb24329e16edc3108b8192d65ace8da75.tar.gz
kernel-qcow2-linux-b2a06aecb24329e16edc3108b8192d65ace8da75.tar.xz
kernel-qcow2-linux-b2a06aecb24329e16edc3108b8192d65ace8da75.zip
[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;