b01edcbd40
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> |
||
---|---|---|
.. | ||
common.c | ||
common.h | ||
fimc-capture.c | ||
fimc-core.c | ||
fimc-core.h | ||
fimc-is-command.h | ||
fimc-is-errno.c | ||
fimc-is-errno.h | ||
fimc-is-i2c.c | ||
fimc-is-i2c.h | ||
fimc-is-param.c | ||
fimc-is-param.h | ||
fimc-is-regs.c | ||
fimc-is-regs.h | ||
fimc-is-sensor.c | ||
fimc-is-sensor.h | ||
fimc-is.c | ||
fimc-is.h | ||
fimc-isp-video.c | ||
fimc-isp-video.h | ||
fimc-isp.c | ||
fimc-isp.h | ||
fimc-lite-reg.c | ||
fimc-lite-reg.h | ||
fimc-lite.c | ||
fimc-lite.h | ||
fimc-m2m.c | ||
fimc-reg.c | ||
fimc-reg.h | ||
Kconfig | ||
Makefile | ||
media-dev.c | ||
media-dev.h | ||
mipi-csis.c | ||
mipi-csis.h |