aboutsummaryrefslogtreecommitdiffstats
path: root/include/media
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2011-09-13 07:07:55 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-11-03 16:29:01 -0400
commit3e0ec41c5c5ee14e27f65e28d4a616de34f59a97 (patch)
tree95d4302f6a26b1494926146dedd1bb25b7834167 /include/media
parent2fbdc9bd42c993a6b179a4ddb972b551644aad6e (diff)
[media] V4L: dynamically allocate video_device nodes in subdevices
Currently only very few drivers actually use video_device nodes, embedded in struct v4l2_subdev. Allocate these nodes dynamically for those drivers to save memory for the rest. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Tested-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include/media')
-rw-r--r--include/media/v4l2-subdev.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h
index 257da1a30f66..5dd049a7437d 100644
--- a/include/media/v4l2-subdev.h
+++ b/include/media/v4l2-subdev.h
@@ -534,13 +534,13 @@ struct v4l2_subdev {
534 void *dev_priv; 534 void *dev_priv;
535 void *host_priv; 535 void *host_priv;
536 /* subdev device node */ 536 /* subdev device node */
537 struct video_device devnode; 537 struct video_device *devnode;
538}; 538};
539 539
540#define media_entity_to_v4l2_subdev(ent) \ 540#define media_entity_to_v4l2_subdev(ent) \
541 container_of(ent, struct v4l2_subdev, entity) 541 container_of(ent, struct v4l2_subdev, entity)
542#define vdev_to_v4l2_subdev(vdev) \ 542#define vdev_to_v4l2_subdev(vdev) \
543 container_of(vdev, struct v4l2_subdev, devnode) 543 video_get_drvdata(vdev)
544 544
545/* 545/*
546 * Used for storing subdev information per file handle 546 * Used for storing subdev information per file handle