Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 30ed2b83 authored by Akinobu Mita's avatar Akinobu Mita Committed by Mauro Carvalho Chehab
Browse files

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 <hans.verkuil@cisco.com>
Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
Acked-by: default avatarSylwester Nawrocki <sylvester.nawrocki@gmail.com>
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 2ec7debd
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;