From b2a06aecb24329e16edc3108b8192d65ace8da75 Mon Sep 17 00:00:00 2001 From: Sakari Ailus Date: Thu, 12 Dec 2013 09:36:46 -0300 Subject: [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 Acked-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab --- include/media/v4l2-subdev.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/media') 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; -- cgit v1.2.3