aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSylwester Nawrocki <sylvester.nawrocki@gmail.com>2013-01-22 17:01:02 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-02-05 12:17:16 -0500
commitffa9b9f016a9c97a3cc205d0d634b10d8f72eb36 (patch)
treea58029210df3da8c60a63d5991265f21a04ff141
parent22fa4279eebc3fa4b3c3dc2b190158dbbafcda9f (diff)
[media] V4L: Add v4l2_ctrl_subdev_log_status() helper function
This patch adds a v4l2 core helper function that can be used as the log_status handler for subdevs that only need to log state of the v4l2 controls owned by the subdev's control handler. Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/v4l2-core/v4l2-ctrls.c7
-rw-r--r--include/media/v4l2-ctrls.h3
2 files changed, 10 insertions, 0 deletions
diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c
index 9051ec53875c..6b28b5800500 100644
--- a/drivers/media/v4l2-core/v4l2-ctrls.c
+++ b/drivers/media/v4l2-core/v4l2-ctrls.c
@@ -2004,6 +2004,13 @@ void v4l2_ctrl_handler_log_status(struct v4l2_ctrl_handler *hdl,
2004} 2004}
2005EXPORT_SYMBOL(v4l2_ctrl_handler_log_status); 2005EXPORT_SYMBOL(v4l2_ctrl_handler_log_status);
2006 2006
2007int v4l2_ctrl_subdev_log_status(struct v4l2_subdev *sd)
2008{
2009 v4l2_ctrl_handler_log_status(sd->ctrl_handler, sd->name);
2010 return 0;
2011}
2012EXPORT_SYMBOL(v4l2_ctrl_subdev_log_status);
2013
2007/* Call s_ctrl for all controls owned by the handler */ 2014/* Call s_ctrl for all controls owned by the handler */
2008int v4l2_ctrl_handler_setup(struct v4l2_ctrl_handler *hdl) 2015int v4l2_ctrl_handler_setup(struct v4l2_ctrl_handler *hdl)
2009{ 2016{
diff --git a/include/media/v4l2-ctrls.h b/include/media/v4l2-ctrls.h
index 1e849461fc9d..f00d42bc01a6 100644
--- a/include/media/v4l2-ctrls.h
+++ b/include/media/v4l2-ctrls.h
@@ -659,4 +659,7 @@ int v4l2_subdev_s_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl);
659int v4l2_ctrl_subdev_subscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh, 659int v4l2_ctrl_subdev_subscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh,
660 struct v4l2_event_subscription *sub); 660 struct v4l2_event_subscription *sub);
661 661
662/* Log all controls owned by subdev's control handler. */
663int v4l2_ctrl_subdev_log_status(struct v4l2_subdev *sd);
664
662#endif 665#endif