[media] media-entity: init pads on entity init if was registered before

If an entity is registered with a media device before is initialized
with media_device_register_entity(), the number of pads won't be set
so media_device_register_entity() won't create pad objects and add
it to the media device pads list.

Do this at entity initialization time if the entity was registered
before so the graph is complete and correct regardless of the order
in which the entities are initialized and registered.

Suggested-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
1 file changed