Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: ov5695: mark PM functions as __maybe_unused

Without CONFIG_PM, we get a harmless build warning:

drivers/media/i2c/ov5695.c:1033:12: error: 'ov5695_runtime_suspend' defined but not used [-Werror=unused-function]
static int ov5695_runtime_suspend(struct device *dev)
^~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/ov5695.c:1024:12: error: 'ov5695_runtime_resume' defined but not used [-Werror=unused-function]
static int ov5695_runtime_resume(struct device *dev)

This marks the affected functions as __maybe_unused.

Fixes: 8a77009be4be ("media: ov5695: add support for OV5695 sensor")

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>

authored by

Arnd Bergmann and committed by
Mauro Carvalho Chehab
94d4a1a6 15001033

+2 -2
+2 -2
drivers/media/i2c/ov5695.c
··· 1021 1021 regulator_bulk_disable(OV5695_NUM_SUPPLIES, ov5695->supplies); 1022 1022 } 1023 1023 1024 - static int ov5695_runtime_resume(struct device *dev) 1024 + static int __maybe_unused ov5695_runtime_resume(struct device *dev) 1025 1025 { 1026 1026 struct i2c_client *client = to_i2c_client(dev); 1027 1027 struct v4l2_subdev *sd = i2c_get_clientdata(client); ··· 1030 1030 return __ov5695_power_on(ov5695); 1031 1031 } 1032 1032 1033 - static int ov5695_runtime_suspend(struct device *dev) 1033 + static int __maybe_unused ov5695_runtime_suspend(struct device *dev) 1034 1034 { 1035 1035 struct i2c_client *client = to_i2c_client(dev); 1036 1036 struct v4l2_subdev *sd = i2c_get_clientdata(client);