[media] media-entity: init pads on entity init if was registered before
authorJavier Martinez Canillas <javier@osg.samsung.com>
Tue, 8 Sep 2015 17:10:56 +0000 (14:10 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Mon, 11 Jan 2016 14:19:02 +0000 (12:19 -0200)
commitdb141a355d8914fe80c9e4a6c25c686f64d7e905
treeaa41ac6f2918978f5c6f9b645ec5161eea818383
parent9033b1a47038fdba388fc13613de23508dccb075
[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>
drivers/media/media-entity.c