You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
[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>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
2fbdc9bd42
commit
3e0ec41c5c
@@ -534,13 +534,13 @@ struct v4l2_subdev {
|
||||
void *dev_priv;
|
||||
void *host_priv;
|
||||
/* subdev device node */
|
||||
struct video_device devnode;
|
||||
struct video_device *devnode;
|
||||
};
|
||||
|
||||
#define media_entity_to_v4l2_subdev(ent) \
|
||||
container_of(ent, struct v4l2_subdev, entity)
|
||||
#define vdev_to_v4l2_subdev(vdev) \
|
||||
container_of(vdev, struct v4l2_subdev, devnode)
|
||||
video_get_drvdata(vdev)
|
||||
|
||||
/*
|
||||
* Used for storing subdev information per file handle
|
||||
|
||||
Reference in New Issue
Block a user