diff mbox

au0828: Fix the logic that enables the analog demoder link

Message ID da46c7fe0cb195e80f5b6128820c8f72bea9f8e2.1440064488.git.mchehab@osg.samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Mauro Carvalho Chehab Aug. 20, 2015, 9:54 a.m. UTC
This logic was broken on the original patch, likely due to a
cut-and-paste mistake.

Fix it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
diff mbox

Patch

diff --git a/drivers/media/usb/au0828/au0828-video.c b/drivers/media/usb/au0828/au0828-video.c
index a9087f05b29a..4511e2893282 100644
--- a/drivers/media/usb/au0828/au0828-video.c
+++ b/drivers/media/usb/au0828/au0828-video.c
@@ -641,7 +641,7 @@  static int au0828_enable_analog_tuner(struct au0828_dev *dev)
 {
 #ifdef CONFIG_MEDIA_CONTROLLER
 	struct media_device *mdev = dev->media_dev;
-	struct media_entity  *entity, *source;
+	struct media_entity *source;
 	struct media_link *link, *found_link = NULL;
 	int ret, active_links = 0;
 
@@ -674,7 +674,7 @@  static int au0828_enable_analog_tuner(struct au0828_dev *dev)
 
 		sink = link->sink->entity;
 
-		if (sink == entity)
+		if (sink == dev->decoder)
 			flags = MEDIA_LNK_FL_ENABLED;
 
 		ret = media_entity_setup_link(link, flags);