summaryrefslogtreecommitdiff
path: root/drivers/media/usb/au0828/au0828-cards.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-06-18 19:06:38 +0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-01-11 17:18:39 +0300
commit0158e7b6a29f33a2c91cf045468958fbe8cb0b4c (patch)
treebf8910826ee8bd6f5dc29e93e21d285a5ede7eac /drivers/media/usb/au0828/au0828-cards.c
parentbed6919665072b1e5bad31a013d53798394e097c (diff)
downloadlinux-0158e7b6a29f33a2c91cf045468958fbe8cb0b4c.tar.xz
[media] au0828: Cache the decoder info at au0828 dev structure
Instead of seeking for the decoder every time analog stream is started, cache it. This simplifies the code a little bit. Requested-by: Hans Verkuil <hverkuil@xs4all.nl> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/usb/au0828/au0828-cards.c')
-rw-r--r--drivers/media/usb/au0828/au0828-cards.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/usb/au0828/au0828-cards.c b/drivers/media/usb/au0828/au0828-cards.c
index 6b469e8c4c6e..ca861aea68a5 100644
--- a/drivers/media/usb/au0828/au0828-cards.c
+++ b/drivers/media/usb/au0828/au0828-cards.c
@@ -228,6 +228,10 @@ void au0828_card_analog_fe_setup(struct au0828_dev *dev)
"au8522", 0x8e >> 1, NULL);
if (sd == NULL)
pr_err("analog subdev registration failed\n");
+#ifdef CONFIG_MEDIA_CONTROLLER
+ if (sd)
+ dev->decoder = &sd->entity;
+#endif
}
/* Setup tuners */