diff options
author | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-08-01 05:36:15 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-09-17 13:16:19 -0400 |
commit | 5e68d8e26e267cf643d0e8d3358b21c30417a961 (patch) | |
tree | dda3efdab1e7c0e355df83aacc67062fd335ac87 /drivers/media/usb | |
parent | f3efe15a2f057d699d4f2d252e6bfc347abd7368 (diff) | |
download | linux-stable-5e68d8e26e267cf643d0e8d3358b21c30417a961.tar.gz linux-stable-5e68d8e26e267cf643d0e8d3358b21c30417a961.tar.bz2 linux-stable-5e68d8e26e267cf643d0e8d3358b21c30417a961.zip |
media: au0828: use signals instead of hardcoding a pad number
When creating the audio link, use pad signals, instead of
hardcoding using the pad index number.
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/usb')
-rw-r--r-- | drivers/media/usb/au0828/au0828-core.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/media/usb/au0828/au0828-core.c b/drivers/media/usb/au0828/au0828-core.c index cd363a2100d4..4729b2a2f21c 100644 --- a/drivers/media/usb/au0828/au0828-core.c +++ b/drivers/media/usb/au0828/au0828-core.c @@ -266,11 +266,13 @@ static void au0828_media_graph_notify(struct media_entity *new, create_link: if (decoder && mixer) { - ret = media_create_pad_link(decoder, - DEMOD_PAD_AUDIO_OUT, - mixer, 0, - MEDIA_LNK_FL_ENABLED); - if (ret) + ret = media_get_pad_index(decoder, false, + PAD_SIGNAL_AUDIO); + if (ret >= 0) + ret = media_create_pad_link(decoder, ret, + mixer, 0, + MEDIA_LNK_FL_ENABLED); + if (ret < 0) dev_err(&dev->usbdev->dev, "Mixer Pad Link Create Error: %d\n", ret); } |