linux/drivers/staging/media
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
..
atomisp Linux 5.11-rc6 2021-02-01 10:03:45 +01:00
hantro Linux 5.11-rc6 2021-02-01 10:03:45 +01:00
imx media: v4l2-async: Improve v4l2_async_notifier_add_*_subdev() API 2021-02-06 09:18:53 +01:00
ipu3 media: staging/intel-ipu3: Do not zero reserved fields 2021-02-06 08:37:45 +01:00
meson/vdec media: meson: vdec: add G12/SM1 to module description 2020-12-03 07:46:11 +01:00
omap4iss media: drivers: staging: media: remove unneeded MODULE_VERSION() call 2021-01-12 18:08:30 +01:00
rkvdec media: staging:rkvdec: Fixed "replace comma with semicolon" Warning 2021-01-12 18:13:54 +01:00
sunxi Linux 5.11-rc6 2021-02-01 10:03:45 +01:00
tegra-vde Staging / IIO driver updates for 5.10-rc1 2020-10-15 09:46:23 -07:00
tegra-video media: v4l2-async: Improve v4l2_async_notifier_add_*_subdev() API 2021-02-06 09:18:53 +01:00
zoran media: zoran: convert comma to semicolon 2021-01-14 13:59:22 +01:00
Kconfig media: allegro: move driver out of staging 2021-01-04 13:19:40 +01:00
Makefile media: allegro: move driver out of staging 2021-01-04 13:19:40 +01:00