media: s3c-camif: ignore -ENOIOCTLCMD from v4l2_subdev_call for s_power
PATCH 1/1 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 Sylwester Nawrocki <[email protected]>
Cc Hans Verkuil <[email protected]>
Cc Sakari Ailus <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
Signed-off-by Akinobu Mita <[email protected]>
--- drivers/media/platform/s3c-camif/camif-capture.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/media/platform/s3c-camif/camif-capture.c +2 -0
@@ -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 ;
Signature · 1 line
2.7.4
Quoted 7 lines · Akinobu Mita
When the subdevice doesn't provide
s_powercore ops callback, thev4l2_subdev_callfors_powerreturns-ENOIOCTLCMD. If the subdevice doesn't have the special handling for its power saving mode, thes_powerisn't required. So-ENOIOCTLCMDfrom thev4l2_subdev_callshould be ignored.Signed-off-by Akinobu Mita<[email protected]>