Commit ffa9b9f0 authored by Sylwester Nawrocki's avatar Sylwester Nawrocki Committed by Mauro Carvalho Chehab

[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: default avatarSylwester Nawrocki <sylvester.nawrocki@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 22fa4279
...@@ -2004,6 +2004,13 @@ void v4l2_ctrl_handler_log_status(struct v4l2_ctrl_handler *hdl, ...@@ -2004,6 +2004,13 @@ void v4l2_ctrl_handler_log_status(struct v4l2_ctrl_handler *hdl,
} }
EXPORT_SYMBOL(v4l2_ctrl_handler_log_status); EXPORT_SYMBOL(v4l2_ctrl_handler_log_status);
int v4l2_ctrl_subdev_log_status(struct v4l2_subdev *sd)
{
v4l2_ctrl_handler_log_status(sd->ctrl_handler, sd->name);
return 0;
}
EXPORT_SYMBOL(v4l2_ctrl_subdev_log_status);
/* Call s_ctrl for all controls owned by the handler */ /* Call s_ctrl for all controls owned by the handler */
int v4l2_ctrl_handler_setup(struct v4l2_ctrl_handler *hdl) int v4l2_ctrl_handler_setup(struct v4l2_ctrl_handler *hdl)
{ {
......
...@@ -659,4 +659,7 @@ int v4l2_subdev_s_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl); ...@@ -659,4 +659,7 @@ int v4l2_subdev_s_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl);
int v4l2_ctrl_subdev_subscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh, int v4l2_ctrl_subdev_subscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh,
struct v4l2_event_subscription *sub); struct v4l2_event_subscription *sub);
/* Log all controls owned by subdev's control handler. */
int v4l2_ctrl_subdev_log_status(struct v4l2_subdev *sd);
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment