OSDN Git Service

media: video-i2c: check if chip struct has set_power function
authorMatt Ranostay <matt.ranostay@konsulko.com>
Sat, 24 Nov 2018 22:03:23 +0000 (17:03 -0500)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Fri, 7 Dec 2018 13:33:23 +0000 (08:33 -0500)
commitac11da47ff45f1f6f19c87cde6f36d9b17d42989
tree297c6170f79d5e96d191eaf02abcfe85c8d69413
parent69d2a734c5dc7085365e752a7e8e35999c7a6c20
media: video-i2c: check if chip struct has set_power function

Not all future supported video chips will always have power management
support, and so it is important to check before calling set_power() is
defined.

Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Reviewed-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/i2c/video-i2c.c