Commit 1d1d8669 authored by Sakari Ailus's avatar Sakari Ailus Committed by Mauro Carvalho Chehab

media: Documentation: mc: Add media_device_{init,cleanup}

Document that drivers must first initialise a media device before
registering it, and clean up once the media device is unregistered.
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent e74e4768
...@@ -42,9 +42,16 @@ Allocation of the structure is handled by the media device driver, usually by ...@@ -42,9 +42,16 @@ Allocation of the structure is handled by the media device driver, usually by
embedding the :c:type:`media_device` instance in a larger driver-specific embedding the :c:type:`media_device` instance in a larger driver-specific
structure. structure.
Drivers register media device instances by calling Drivers initialise media device instances by calling
:c:func:`__media_device_register()` via the macro ``media_device_register()`` :c:func:`media_device_init()`. After initialising a media device instance, it is
and unregistered by calling :c:func:`media_device_unregister()`. registered by calling :c:func:`__media_device_register()` via the macro
``media_device_register()`` and unregistered by calling
:c:func:`media_device_unregister()`. An initialised media device must be
eventually cleaned up by calling :c:func:`media_device_cleanup()`.
Note that it is not allowed to unregister a media device instance that was not
previously registered, or clean up a media device instance that was not
previously initialised.
Entities Entities
^^^^^^^^ ^^^^^^^^
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment