media: atmel: atmel-isc: fix and cleanup potential bugs

Fixed issues that can lead to potential bugs.
Cleanup order in the driver
Taking into consideration std control creation can fail
mutex_destroy call
changing controller_formats with const specifier
some cosmetic cleanups

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
Eugen Hristev
2019-06-12 08:00:35 -04:00
committed by Mauro Carvalho Chehab
parent 0a0e265515
commit b046ec51f9
3 changed files with 29 additions and 15 deletions

View File

@@ -235,7 +235,7 @@ extern unsigned int debug;
extern unsigned int sensor_preferred;
extern struct isc_format formats_list[];
extern struct isc_format controller_formats[];
extern const struct isc_format controller_formats[];
extern const u32 isc_gamma_table[GAMMA_MAX + 1][GAMMA_ENTRIES];
extern const struct regmap_config isc_regmap_config;
extern const struct v4l2_async_notifier_operations isc_async_ops;