diff mbox

[v3,12/21] media: au0828 fix au0828_create_media_graph() entity checks

Message ID 9a717e8f411fc1a1bac2c984f154ada401a9186c.1442937669.git.shuahkh@osg.samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Shuah Khan Sept. 22, 2015, 5:19 p.m. UTC
au0828_create_media_graph() checks if entity.links is null
or not to determine, if vbi_dev and vdev entities have been
registered. Checking entity.parent field is right way, as
parent field gets initialized when entity is registered. Fix
it to check entity.parent field.

Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
---
 drivers/media/usb/au0828/au0828-core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/drivers/media/usb/au0828/au0828-core.c b/drivers/media/usb/au0828/au0828-core.c
index 276598b..0b8dc49 100644
--- a/drivers/media/usb/au0828/au0828-core.c
+++ b/drivers/media/usb/au0828/au0828-core.c
@@ -263,11 +263,11 @@  static void au0828_create_media_graph(struct au0828_dev *dev)
 	if (tuner)
 		media_entity_create_link(tuner, 0, decoder, 0,
 					 MEDIA_LNK_FL_ENABLED);
-	if (dev->vdev.entity.links)
+	if (dev->vdev.entity.parent)
 		media_entity_create_link(decoder, AU8522_PAD_VID_OUT,
 					 &dev->vdev.entity, 0,
 					 MEDIA_LNK_FL_ENABLED);
-	if (dev->vbi_dev.entity.links)
+	if (dev->vbi_dev.entity.parent)
 		media_entity_create_link(decoder, AU8522_PAD_VBI_OUT,
 					 &dev->vbi_dev.entity, 0,
 					 MEDIA_LNK_FL_ENABLED);