media: ti-vpe: cal: Move all sensor-related init to .bound() notifier
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Mon, 6 Jul 2020 18:36:21 +0000 (20:36 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sun, 19 Jul 2020 08:28:24 +0000 (10:28 +0200)
commita439e57358ee1562257668d77b19f8f1a629a1fd
treef01c4e1d1cd0604245a3e613e35bd1e966313c3b
parent4d04c23fadc67acc47f26f7143e15c81b0143f47
media: ti-vpe: cal: Move all sensor-related init to .bound() notifier

The initialization of the context based on the connected sensor is split
between the async notifier .bound() and .complete() operations. Move it
all to a separate function and call it from .bound() operation to
prepare for the move of the notifiers from the contexts to the cal_dev.
Only V4L2 registration is kept in the .complete() operation.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Benoit Parrot <bparrot@ti.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/ti-vpe/cal.c