]> git.baikalelectronics.ru Git - kernel.git/commit
media: v4l2-flash: Add sanity checks for flash and indicator controls
authorSakari Ailus <sakari.ailus@linux.intel.com>
Thu, 24 Jun 2021 12:05:24 +0000 (14:05 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 4 Aug 2021 12:43:51 +0000 (14:43 +0200)
commit92cd7aaca31b14b9f4320f9d5ae2c1a4361b3f98
tree574c68b15d50d44612c8b9ee31f96b1a58daa8c6
parent9cf7515d05b8fd0a32ead00083fe6eae5f760444
media: v4l2-flash: Add sanity checks for flash and indicator controls

The V4L2 flash API supports combinations of indicator and flash LEDs. Due
to this, there's a fair amount of code that deals with all the possible
options and just reading one part of the file doesn't really tell which
combinations are really possible.

Make the checks more explicit to keep static analysers happy and to make
the code more resilient to future mishaps.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/v4l2-core/v4l2-flash-led-class.c