From d079f94c90469f413920b9f2b201537fac2ceb06 Mon Sep 17 00:00:00 2001 From: Steve Longerbeam Date: Sat, 29 Sep 2018 15:54:18 -0400 Subject: media: platform: Switch to v4l2_async_notifier_add_subdev Switch all media platform drivers to call v4l2_async_notifier_add_subdev() to add asd's to a notifier, in place of referencing the notifier->subdevs[] array. These drivers also must now call v4l2_async_notifier_init() before adding asd's to their notifiers. There may still be cases where a platform driver maintains a list of asd's that is a duplicate of the notifier asd_list, in which case its possible the platform driver list can be removed, and can reference the notifier asd_list instead. One example of where a duplicate list has been removed in this patch is xilinx-vipp.c. If there are such cases remaining, those drivers should be optimized to remove the duplicate platform driver asd lists. None of the changes to the platform drivers in this patch have been tested. Verify that the async subdevices needed by the platform are bound at load time, and that the driver unloads and reloads correctly with no memory leaking of asd objects. Suggested-by: Sakari Ailus Signed-off-by: Steve Longerbeam Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab --- drivers/media/platform/xilinx/xilinx-vipp.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'drivers/media/platform/xilinx/xilinx-vipp.h') diff --git a/drivers/media/platform/xilinx/xilinx-vipp.h b/drivers/media/platform/xilinx/xilinx-vipp.h index faf6b6e80b3b..7e9c4cff33b4 100644 --- a/drivers/media/platform/xilinx/xilinx-vipp.h +++ b/drivers/media/platform/xilinx/xilinx-vipp.h @@ -28,8 +28,6 @@ * @media_dev: media device * @dev: (OF) device * @notifier: V4L2 asynchronous subdevs notifier - * @entities: entities in the graph as a list of xvip_graph_entity - * @num_subdevs: number of subdevs in the pipeline * @dmas: list of DMA channels at the pipeline output and input * @v4l2_caps: V4L2 capabilities of the whole device (see VIDIOC_QUERYCAP) */ @@ -39,8 +37,6 @@ struct xvip_composite_device { struct device *dev; struct v4l2_async_notifier notifier; - struct list_head entities; - unsigned int num_subdevs; struct list_head dmas; u32 v4l2_caps; -- cgit v1.2.3