aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/vimc/vimc-common.c
diff options
context:
space:
mode:
authorHans Verkuil <[email protected]>2019-03-01 11:11:27 +0000
committerMauro Carvalho Chehab <[email protected]>2019-03-19 17:29:37 +0000
commit218bf10e39ed5fb22a48dee40bfd2bbcb91693ba (patch)
treefae09b667509e0ed99447119c42b359186350360 /drivers/media/platform/vimc/vimc-common.c
parentmedia: v4l2-subdev: add release() internal op (diff)
downloadkernel-218bf10e39ed5fb22a48dee40bfd2bbcb91693ba.tar.gz
kernel-218bf10e39ed5fb22a48dee40bfd2bbcb91693ba.zip
media: v4l2-subdev: handle module refcounting here
The module ownership refcounting was done in media_entity_get/put, but that was very confusing and it did not work either in case an application had a v4l-subdevX device open and the module was unbound. When the v4l-subdevX device was closed the media_entity_put was never called and the module refcount was left one too high, making it impossible to unload it. Since v4l2-subdev.c was the only place where media_entity_get/put was called, just move the functionality to v4l2-subdev.c and drop those confusing entity functions. Store the module in subdev_fh so module_put no longer depends on the media_entity struct. Signed-off-by: Hans Verkuil <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Diffstat (limited to 'drivers/media/platform/vimc/vimc-common.c')
0 files changed, 0 insertions, 0 deletions