From: Akinobu Mita Date: Sun, 10 Jun 2018 15:42:01 +0000 (-0400) Subject: media: s3c-camif: ignore -ENOIOCTLCMD from v4l2_subdev_call for s_power X-Git-Tag: android-x86-8.1-r1~474^2~322 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=30ed2b83343bd1e07884ca7355dac70d25ffc158;p=android-x86%2Fkernel.git media: s3c-camif: ignore -ENOIOCTLCMD from v4l2_subdev_call for s_power 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 Signed-off-by: Akinobu Mita Acked-by: Sylwester Nawrocki Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/platform/s3c-camif/camif-capture.c b/drivers/media/platform/s3c-camif/camif-capture.c index 9ab8e7ee2e1e..b1d9f3857d3d 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;