aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/vsp1/vsp1_entity.h
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2014-05-28 11:49:13 -0400
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-07-17 11:44:52 -0400
commit1499be67a545fb6f41acb5614b8e4732147cec50 (patch)
tree29bd2282d712ca560ed01dd6202f7e9b4caebf3c /drivers/media/platform/vsp1/vsp1_entity.h
parent7005a81705d032887b9f4f808e6dce8e57b8980a (diff)
[media] v4l: vsp1: Cleanup video nodes at removal time
Video nodes created and initialized in the RPF and WPF init code paths are never unregistered, and the related resources (videobuf alloc context and media entity) never released. Fix this by storing a pointer to the vsp1_video object in vsp1_entity and calling vsp1_video_cleanup() from vsp1_entity_destroy(). This also allows simplifying the init error code paths. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/platform/vsp1/vsp1_entity.h')
-rw-r--r--drivers/media/platform/vsp1/vsp1_entity.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/platform/vsp1/vsp1_entity.h b/drivers/media/platform/vsp1/vsp1_entity.h
index 7afbd8a7ba66..f0257f68f16a 100644
--- a/drivers/media/platform/vsp1/vsp1_entity.h
+++ b/drivers/media/platform/vsp1/vsp1_entity.h
@@ -18,6 +18,7 @@
18#include <media/v4l2-subdev.h> 18#include <media/v4l2-subdev.h>
19 19
20struct vsp1_device; 20struct vsp1_device;
21struct vsp1_video;
21 22
22enum vsp1_entity_type { 23enum vsp1_entity_type {
23 VSP1_ENTITY_BRU, 24 VSP1_ENTITY_BRU,
@@ -68,6 +69,8 @@ struct vsp1_entity {
68 69
69 struct v4l2_subdev subdev; 70 struct v4l2_subdev subdev;
70 struct v4l2_mbus_framefmt *formats; 71 struct v4l2_mbus_framefmt *formats;
72
73 struct vsp1_video *video;
71}; 74};
72 75
73static inline struct vsp1_entity *to_vsp1_entity(struct v4l2_subdev *subdev) 76static inline struct vsp1_entity *to_vsp1_entity(struct v4l2_subdev *subdev)