media: ti-vpe: cal: Move v4l2_device from cal_ctx to cal_dev
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Mon, 6 Jul 2020 18:36:14 +0000 (20:36 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sun, 19 Jul 2020 07:30:23 +0000 (09:30 +0200)
commitb4b784953c49c01ef0a52b7e81a938bb4bbf53d5
tree822ba7f6fce4c438b5905cfa390688e4112c6226
parent4b71bfbc9787e359f63ef0d876e173b1c474ffc7
media: ti-vpe: cal: Move v4l2_device from cal_ctx to cal_dev

The v4l2_device structure is meant to represent the whole device. In the
CAL case, this corresponds to the CAL, the CAMERARX instances and the
connected sensors. There should thus be a single v4l2_device instance.
Replace the per-context instance with a global instance in the cal_dev
structure.

Don't set the v4l2_device name manually as v4l2_device_register() sets
it to a value that is suitable for the driver.

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