linux/drivers/media/platform/atmel
Laurent Pinchart b01edcbd40 media: v4l2-async: Improve v4l2_async_notifier_add_*_subdev() API
The functions that add an async subdev to an async subdev notifier take
as an argument the size of the container structure they need to
allocate. This is error prone, as passing an invalid size will not be
caught by the compiler. Wrap those functions in macros that take a
container type instead of a size, and cast the returned pointer to the
desired type. The compiler will catch mistakes if the incorrect type is
passed to the macro, as the assignment types won't match.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Helen Koike <helen.koike@collabora.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> (core+ti-cal)
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-02-06 09:18:53 +01:00
..
atmel-isc-base.c media: atmel: atmel-isc: rework component offsets 2020-07-19 07:55:39 +02:00
atmel-isc-regs.h media: atmel: atmel-isc: rework component offsets 2020-07-19 07:55:39 +02:00
atmel-isc.h media: atmel: Use v4l2_async_notifier_add_fwnode_remote_subdev 2021-02-06 08:41:06 +01:00
atmel-isi.c media: v4l2-async: Improve v4l2_async_notifier_add_*_subdev() API 2021-02-06 09:18:53 +01:00
atmel-isi.h media: atmel: atmel-isi: add support for mono sensors, GRAY and Y16 2019-12-16 10:16:56 +01:00
atmel-sama5d2-isc.c media: v4l2-async: Improve v4l2_async_notifier_add_*_subdev() API 2021-02-06 09:18:53 +01:00
Kconfig media: Kconfig files: use select for V4L2 subdevs and MC 2020-04-14 10:29:05 +02:00
Makefile media: atmel: atmel-isc: split driver into driver base and isc 2019-06-21 16:36:11 -04:00