[alsa-devel] [PATCH v3 12/21] media: au0828 fix au0828_create_media_graph() entity checks
Shuah Khan
shuahkh at osg.samsung.com
Tue Sep 22 19:19:31 CEST 2015
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 at osg.samsung.com>
---
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
More information about the Alsa-devel
mailing list