]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
media: ti-vpe: cal: Split media initialization and cleanup to functions
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Mon, 6 Jul 2020 18:36:30 +0000 (20:36 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sun, 19 Jul 2020 08:32:41 +0000 (10:32 +0200)
commit45dd15e6ce2241da7d3f08b86b680d8b7d3dcd67
treed087d9e237b5a2a02920adee46bf02bc89ca92d1
parenta0db060fb100c16b533595f468ed57ba4bb2d5a3
media: ti-vpe: cal: Split media initialization and cleanup to functions

Create four functions to handle initialization, cleanup, registration
and unregistration of the V4L2 (and soon media controller) objects:

- init() is meant to be called early at probe time to initialize the
  objects, before they get used from within the kernel

- cleanup() is the counterpart of init, and is meant to be called at the
  end of the remove sequence to free all objects

- register() is meant to be called at the end of the probe sequence, to
  register the userspace-facing devices

- unregister() is the counterpart of register, and is meant to be called
  at the beginning for the remove sequence, to disallow access from
  userspace

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/ti-vpe/cal.c