OSDN Git Service

media: imx: csi: Lookup upstream endpoint with imx_media_get_pad_fwnode
authorSteve Longerbeam <slongerbeam@gmail.com>
Fri, 1 May 2020 17:15:53 +0000 (19:15 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 18 May 2020 12:30:44 +0000 (14:30 +0200)
commitf02eac790df271976a2e22a11c46d1d95f8b93eb
treede2c903bea31ae4966920c4021dabef2f6907986
parent86e02d07871c2ea389cc94becb2009c59420cd57
media: imx: csi: Lookup upstream endpoint with imx_media_get_pad_fwnode

Fix the 1:1 port-id:pad-index assumption for the upstream subdevice, by
searching the upstream subdevice's endpoints for one that maps to the
pad's index. This is carried out by a new reverse mapping function
imx_media_get_pad_fwnode().

Signed-off-by: Steve Longerbeam <slongerbeam@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/imx/imx-media-csi.c
drivers/staging/media/imx/imx-media-utils.c
drivers/staging/media/imx/imx-media.h