mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
[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>
This commit is contained in:
parent
85de721c46
commit
b2a06aecb2
2 changed files with 16 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue