media: ccs: Use sub-device active state
authorSakari Ailus <sakari.ailus@linux.intel.com>
Thu, 24 Aug 2023 07:31:10 +0000 (10:31 +0300)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Sat, 7 Oct 2023 08:55:48 +0000 (10:55 +0200)
commitd8bca3ed1d70652e68b07799171d471026b7b3e2
treea53eb6116ed1c9c258c944f5f4f9b154eb9af9fd
parentf00a1572b65a444082fb72488ae3b7ce73065696
media: ccs: Use sub-device active state

Make use of sub-device active state. In most cases the effect on need for
acquiring the mutex is non-existent as access to the driver's core data
structure still needs to be serialised.

This still removes a lot of code as the code paths for active and try
state are the same in many cases.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/i2c/ccs/ccs-core.c
drivers/media/i2c/ccs/ccs.h