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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx>
---
 drivers/media/usb/au0828/au0828-core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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);
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux