media: i2c: imx290: set bus_type before calling v4l2_fwnode_endpoint_alloc_parse()
authorAndrey Konovalov <andrey.konovalov@linaro.org>
Fri, 12 Jun 2020 13:53:55 +0000 (15:53 +0200)
committerpopcornmix <popcornmix@gmail.com>
Wed, 1 Jul 2020 15:34:16 +0000 (16:34 +0100)
commit6a67a38b77bf0ed645a52a306bd60688daf2713b
tree49f27249639e4d3bdde07db665fe9774ade82702
parentcf88003b4ecde6bed5d9dfc356dcc8fa8291ba07
media: i2c: imx290: set bus_type before calling v4l2_fwnode_endpoint_alloc_parse()

Commit a270675875829b6d46eb9e38960fd6019555ebb8 upstream.

The bus_type field of v4l2_fwnode_endpoint structure passed as the argument
to v4l2_fwnode_endpoint_alloc_parse() function must be initiaized.
Set it to V4L2_MBUS_CSI2_DPHY, and check for -ENXIO which is returned
when the requested media bus type doesn't match the fwnode.

Also remove v4l2_fwnode_endpoint field from struct imx290 as it is only
needed in the probe function: use the local variable for this purpose.

Signed-off-by: Andrey Konovalov <andrey.konovalov@linaro.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/i2c/imx290.c