summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2018-06-10 11:42:01 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-10-10 08:52:05 +0200
commitf63d861f1c6142ebffd30d0ed5c0b4bb3344cd3b (patch)
tree657f8e322b8f64bf40a3cb1d392088907b6242dc /drivers/media
parent8b4ef82205d4147d82a41e71e7698d82fee0d251 (diff)
media: s3c-camif: ignore -ENOIOCTLCMD from v4l2_subdev_call for s_power
[ Upstream commit 30ed2b83343bd1e07884ca7355dac70d25ffc158 ] 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 <hans.verkuil@cisco.com> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Acked-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/platform/s3c-camif/camif-capture.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/platform/s3c-camif/camif-capture.c b/drivers/media/platform/s3c-camif/camif-capture.c
index fa6af4a7dae1..f97f4bc22ced 100644
--- a/drivers/media/platform/s3c-camif/camif-capture.c
+++ b/drivers/media/platform/s3c-camif/camif-capture.c
@@ -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;