OSDN Git Service

media: v4l2-async: Clean v4l2_async_notifier_add_fwnode_remote_subdev
authorEzequiel Garcia <ezequiel@collabora.com>
Mon, 18 Jan 2021 01:52:45 +0000 (02:52 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sat, 6 Feb 2021 07:40:36 +0000 (08:40 +0100)
commitc1cf3d896d124e3e00794f9bfbde49f0fc279e3f
tree40a706481c461b75bdc74d64f1746ea56483274f
parent38a50230292f232852f4e648d5e0a1cfaf37081b
media: v4l2-async: Clean v4l2_async_notifier_add_fwnode_remote_subdev

Change v4l2_async_notifier_add_fwnode_remote_subdev semantics
so it allocates the struct v4l2_async_subdev pointer.

This makes the API consistent: the v4l2-async subdevice addition
functions have now a unified usage model. This model is simpler,
as it makes v4l2-async responsible for the allocation and release
of the subdevice descriptor, and no longer something the driver
has to worry about.

On the user side, the change makes the API simpler for the drivers
to use and less error-prone.

Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Helen Koike <helen.koike@collabora.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
12 files changed:
drivers/media/pci/intel/ipu3/ipu3-cio2-main.c
drivers/media/platform/omap3isp/isp.c
drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c
drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.h
drivers/media/platform/video-mux.c
drivers/media/v4l2-core/v4l2-async.c
drivers/staging/media/imx/imx-media-csi.c
drivers/staging/media/imx/imx6-mipi-csi2.c
drivers/staging/media/imx/imx7-media-csi.c
drivers/staging/media/imx/imx7-mipi-csis.c
include/media/v4l2-async.h