media: i2c: adv748x: Register only enabled inputs
authorJacopo Mondi <[email protected]>
Mon, 17 Sep 2018 11:30:57 +0000 (07:30 -0400)
committerMauro Carvalho Chehab <[email protected]>
Thu, 4 Oct 2018 18:50:44 +0000 (14:50 -0400)
commit1e2cb06f2ae7011b1bb8a9e74fb0884ae3b07a59
tree3376d931d7feac92bd718759b749ade2df4c075b
parenta7f9d21e9e96dea2e41d82e08ea2a55afdadd741
media: i2c: adv748x: Register only enabled inputs

The adv748x assumes input endpoints are always enabled, and registers
a subdevice for each of them when the corresponding output subdevice
is registered.

Fix this by conditionally registering the input subdevice only if it is
actually described in device tree.

Tested-by: Laurent Pinchart <[email protected]>
Signed-off-by: Jacopo Mondi <[email protected]>
Signed-off-by: Kieran Bingham <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
drivers/media/i2c/adv748x/adv748x-csi2.c
drivers/media/i2c/adv748x/adv748x.h