media_device_register_entity — registers a media entity inside a previously registered media device.
int media_device_register_entity ( | struct media_device * mdev, |
struct media_entity * entity) ; |
Entities are identified by a unique positive integer ID. The media controller framework will such ID automatically. IDs are not guaranteed to be contiguous, and the ID number can change on newer Kernel versions. So, neither the driver nor userspace should hardcode ID numbers to refer to the entities, but, instead, use the framework to find the ID, when needed.
The media_entity name, type and flags fields should be initialized before
calling media_device_register_entity
. Entities embedded in higher-level
standard structures can have some of those fields set by the higher-level
framework.
If the device has pads, media_entity_pads_init
should be called before
this function. Otherwise, the media_entity.pad
and media_entity.num_pads
should be zeroed before calling this function.