]> git.baikalelectronics.ru Git - kernel.git/commit
media: pxa_camera: ignore -ENOIOCTLCMD from v4l2_subdev_call for s_power
authorAkinobu Mita <akinobu.mita@gmail.com>
Sun, 3 Jun 2018 14:14:25 +0000 (10:14 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Tue, 5 Jun 2018 13:50:20 +0000 (09:50 -0400)
commit59a78b3c2faa66ca52ef1aab21a8c4f91302bc04
tree1ebb94a183bbed7d00e7b0be286f1ca25e1279de
parent72c042686739708233cee3a98ca48561a4b181ca
media: pxa_camera: 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.

Actually the -ENOIOCTLCMD is ignored in this driver's suspend/resume,
but the others treat the -ENOIOCTLCMD as an error.

This prepares a wrapper function to ignore -ENOIOCTLCMD and replaces
all s_power calls with it.

This also adds warning message when s_power() is failed.

Cc: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/platform/pxa_camera.c