media: imx: imx7_mipi_csis: Minimize locking in get/set format
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Tue, 13 Apr 2021 02:29:56 +0000 (04:29 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sun, 23 May 2021 17:21:32 +0000 (19:21 +0200)
commit2cb7c5c08cf25b0d2d375732a76b1185c92a1853
treef818800aab7b9b66a0caceced074ab23e23e94d7
parenteed6a93044e38a63e397f7aef8dbc7ee667459fb
media: imx: imx7_mipi_csis: Minimize locking in get/set format

Reduce the code sections that are run with the lock held in the get/set
format handlers:

- mipi_csis_get_format() retrieves a pointer to the format, and thus
  doesn't need locking as long as the arguments passed to the function
  don't require locking either.

- sdformat is a structure passed by the caller, not an internal state,
  and thus doesn't require locking.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Rui Miguel Silva <rmfrfs@gmail.com>
Tested-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/imx/imx7-mipi-csis.c