aboutsummaryrefslogtreecommitdiffstats
path: root/include/media
diff options
context:
space:
mode:
authorSylwester Nawrocki <s.nawrocki@samsung.com>2013-07-22 07:01:33 -0400
committerMauro Carvalho Chehab <m.chehab@samsung.com>2013-07-30 14:54:56 -0400
commitb426b3a660c85faf6e1ca1c92c6d43577022aa3b (patch)
treeac2d0ff8b1a9946901f280f7516308a04c4292e8 /include/media
parente8419d0890efaccb93f9f274d9ba0aae91210e8c (diff)
[media] V4L: Merge struct v4l2_async_subdev_list with struct v4l2_subdev
By integrating the v4l2-async API internals a bit more with the core overall the v4l2-async code becomes a bit simpler and easier to follow. Acked-and-tested-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'include/media')
-rw-r--r--include/media/v4l2-async.h15
-rw-r--r--include/media/v4l2-subdev.h13
2 files changed, 7 insertions, 21 deletions
diff --git a/include/media/v4l2-async.h b/include/media/v4l2-async.h
index 8fac8eaca51a..768356917bea 100644
--- a/include/media/v4l2-async.h
+++ b/include/media/v4l2-async.h
@@ -62,25 +62,12 @@ struct v4l2_async_subdev {
62}; 62};
63 63
64/** 64/**
65 * v4l2_async_subdev_list - provided by subdevices
66 * @list: links struct v4l2_async_subdev_list objects to a global list
67 * before probing, and onto notifier->done after probing
68 * @asd: pointer to respective struct v4l2_async_subdev
69 * @notifier: pointer to managing notifier
70 */
71struct v4l2_async_subdev_list {
72 struct list_head list;
73 struct v4l2_async_subdev *asd;
74 struct v4l2_async_notifier *notifier;
75};
76
77/**
78 * v4l2_async_notifier - v4l2_device notifier data 65 * v4l2_async_notifier - v4l2_device notifier data
79 * @num_subdevs:number of subdevices 66 * @num_subdevs:number of subdevices
80 * @subdevs: array of pointers to subdevice descriptors 67 * @subdevs: array of pointers to subdevice descriptors
81 * @v4l2_dev: pointer to struct v4l2_device 68 * @v4l2_dev: pointer to struct v4l2_device
82 * @waiting: list of struct v4l2_async_subdev, waiting for their drivers 69 * @waiting: list of struct v4l2_async_subdev, waiting for their drivers
83 * @done: list of struct v4l2_async_subdev_list, already probed 70 * @done: list of struct v4l2_subdev, already probed
84 * @list: member in a global list of notifiers 71 * @list: member in a global list of notifiers
85 * @bound: a subdevice driver has successfully probed one of subdevices 72 * @bound: a subdevice driver has successfully probed one of subdevices
86 * @complete: all subdevices have been probed successfully 73 * @complete: all subdevices have been probed successfully
diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h
index 3250cc5e7925..bfda0fe9aeb0 100644
--- a/include/media/v4l2-subdev.h
+++ b/include/media/v4l2-subdev.h
@@ -586,15 +586,14 @@ struct v4l2_subdev {
586 struct video_device *devnode; 586 struct video_device *devnode;
587 /* pointer to the physical device, if any */ 587 /* pointer to the physical device, if any */
588 struct device *dev; 588 struct device *dev;
589 struct v4l2_async_subdev_list asdl; 589 /* Links this subdev to a global subdev_list or @notifier->done list. */
590 struct list_head async_list;
591 /* Pointer to respective struct v4l2_async_subdev. */
592 struct v4l2_async_subdev *asd;
593 /* Pointer to the managing notifier. */
594 struct v4l2_async_notifier *notifier;
590}; 595};
591 596
592static inline struct v4l2_subdev *v4l2_async_to_subdev(
593 struct v4l2_async_subdev_list *asdl)
594{
595 return container_of(asdl, struct v4l2_subdev, asdl);
596}
597
598#define media_entity_to_v4l2_subdev(ent) \ 597#define media_entity_to_v4l2_subdev(ent) \
599 container_of(ent, struct v4l2_subdev, entity) 598 container_of(ent, struct v4l2_subdev, entity)
600#define vdev_to_v4l2_subdev(vdev) \ 599#define vdev_to_v4l2_subdev(vdev) \