Obtain unique source pad from a remote sub-device, instead of the first
one. This means that only one link may be active at stream start. There's
no functional change in practice, unless multiple CSI-2 transmitters are
directly connected to the receiver.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Bingbu Cao <bingbu.cao@intel.com>
Tested-by: Mehdi Djait <mehdi.djait@linux.intel.com> # Dell XPS 9315
Reviewed-by: Mehdi Djait <mehdi.djait@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
remote_sd = media_entity_to_v4l2_subdev(remote_pad->entity);
asd = to_ipu6_isys_subdev(remote_sd);
- source_pad = media_pad_remote_pad_first(&remote_pad->entity->pads[0]);
- if (!source_pad) {
+ source_pad = media_pad_remote_pad_unique(&remote_pad->entity->pads[0]);
+ if (IS_ERR(source_pad)) {
dev_dbg(dev, "No external source entity\n");
- return -ENODEV;
+ return PTR_ERR(source_pad);
}
*source_entity = source_pad->entity;