Skip to content

Commit

Permalink
media: s3c-camif: ignore -ENOIOCTLCMD from v4l2_subdev_call for s_power
Browse files Browse the repository at this point in the history
When the subdevice doesn't provide s_power core ops callback, the
v4l2_subdev_call for s_power returns -ENOIOCTLCMD.  If the subdevice
doesn't have the special handling for its power saving mode, the s_power
isn't required.  So -ENOIOCTLCMD from the v4l2_subdev_call should be
ignored.

Cc: Hans Verkuil <[email protected]>
Signed-off-by: Akinobu Mita <[email protected]>
Acked-by: Sylwester Nawrocki <[email protected]>
Signed-off-by: Sakari Ailus <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
mita authored and mchehab committed Jun 28, 2018
1 parent 2ec7deb commit 30ed2b8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/media/platform/s3c-camif/camif-capture.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ static int sensor_set_power(struct camif_dev *camif, int on)

if (camif->sensor.power_count == !on)
err = v4l2_subdev_call(sensor->sd, core, s_power, on);
if (err == -ENOIOCTLCMD)
err = 0;
if (!err)
sensor->power_count += on ? 1 : -1;

Expand Down

0 comments on commit 30ed2b8

Please sign in to comment.