mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-21 18:25:26 -04:00
media: v4l2-subdev: Print early in v4l2_subdev_{enable,disable}_streams()
Print debug messages early in v4l2_subdev_enable_streams() and v4l2_subdev_disable_streams(), before sanity checks take place. This can help figuring out why something goes wrong, in driver development or otherwise. Also print the name of the sub-device where streaming is to be enabled or disabled. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
This commit is contained in:
committed by
Hans Verkuil
parent
7a8212f3bc
commit
f98691668e
@@ -2285,6 +2285,9 @@ int v4l2_subdev_enable_streams(struct v4l2_subdev *sd, u32 pad,
|
||||
bool use_s_stream;
|
||||
int ret;
|
||||
|
||||
dev_dbg(dev, "enable streams \"%s\":%u/%#llx\n", sd->entity.name, pad,
|
||||
streams_mask);
|
||||
|
||||
/* A few basic sanity checks first. */
|
||||
if (pad >= sd->entity.num_pads)
|
||||
return -EINVAL;
|
||||
@@ -2332,8 +2335,6 @@ int v4l2_subdev_enable_streams(struct v4l2_subdev *sd, u32 pad,
|
||||
goto done;
|
||||
}
|
||||
|
||||
dev_dbg(dev, "enable streams %u:%#llx\n", pad, streams_mask);
|
||||
|
||||
already_streaming = v4l2_subdev_is_streaming(sd);
|
||||
|
||||
if (!use_s_stream) {
|
||||
@@ -2385,6 +2386,9 @@ int v4l2_subdev_disable_streams(struct v4l2_subdev *sd, u32 pad,
|
||||
bool use_s_stream;
|
||||
int ret;
|
||||
|
||||
dev_dbg(dev, "disable streams \"%s\":%u/%#llx\n", sd->entity.name, pad,
|
||||
streams_mask);
|
||||
|
||||
/* A few basic sanity checks first. */
|
||||
if (pad >= sd->entity.num_pads)
|
||||
return -EINVAL;
|
||||
@@ -2432,8 +2436,6 @@ int v4l2_subdev_disable_streams(struct v4l2_subdev *sd, u32 pad,
|
||||
goto done;
|
||||
}
|
||||
|
||||
dev_dbg(dev, "disable streams %u:%#llx\n", pad, streams_mask);
|
||||
|
||||
if (!use_s_stream) {
|
||||
/* Call the .disable_streams() operation. */
|
||||
ret = v4l2_subdev_call(sd, pad, disable_streams, state, pad,
|
||||
|
||||
Reference in New Issue
Block a user