media: mc: Make media_get_pad_index() use pad type flag
Use the pad flag specifying the pad type instead of a boolean in preparation for internal source pads. Also make the loop variable unsigned. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
This commit is contained in:
committed by
Hans Verkuil
parent
7ab9484332
commit
4fd463e938
@@ -730,7 +730,7 @@ int dvb_create_media_graph(struct dvb_adapter *adap,
|
||||
MEDIA_LNK_FL_ENABLED,
|
||||
false);
|
||||
} else {
|
||||
pad_sink = media_get_pad_index(tuner, true,
|
||||
pad_sink = media_get_pad_index(tuner, MEDIA_PAD_FL_SINK,
|
||||
PAD_SIGNAL_ANALOG);
|
||||
if (pad_sink < 0)
|
||||
return -EINVAL;
|
||||
@@ -748,7 +748,7 @@ int dvb_create_media_graph(struct dvb_adapter *adap,
|
||||
|
||||
if (ntuner && ndemod) {
|
||||
/* NOTE: first found tuner source pad presumed correct */
|
||||
pad_source = media_get_pad_index(tuner, false,
|
||||
pad_source = media_get_pad_index(tuner, MEDIA_PAD_FL_SOURCE,
|
||||
PAD_SIGNAL_ANALOG);
|
||||
if (pad_source < 0)
|
||||
return -EINVAL;
|
||||
|
||||
Reference in New Issue
Block a user