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

media: ov2685: mark PM functions as __maybe_unused

Without CONFIG_PM, we get a harmless build warning:

drivers/media/i2c/ov2685.c:516:12: error: 'ov2685_runtime_suspend' defined but not used [-Werror=unused-function]
static int ov2685_runtime_suspend(struct device *dev)
^~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/ov2685.c:507:12: error: 'ov2685_runtime_resume' defined but not used [-Werror=unused-function]
static int ov2685_runtime_resume(struct device *dev)

This marks the affected functions as __maybe_unused.

Fixes: e3861d9118c8 ("media: ov2685: add support for OV2685 sensor")

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
[hans.verkuil@cisco.com: fixed typo in Subject: was ov5695]
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
15ea2df9 94d4a1a6

+2 -2
+2 -2
drivers/media/i2c/ov2685.c
··· 504 504 } 505 505 #endif 506 506 507 - static int ov2685_runtime_resume(struct device *dev) 507 + static int __maybe_unused ov2685_runtime_resume(struct device *dev) 508 508 { 509 509 struct i2c_client *client = to_i2c_client(dev); 510 510 struct v4l2_subdev *sd = i2c_get_clientdata(client); ··· 513 513 return __ov2685_power_on(ov2685); 514 514 } 515 515 516 - static int ov2685_runtime_suspend(struct device *dev) 516 + static int __maybe_unused ov2685_runtime_suspend(struct device *dev) 517 517 { 518 518 struct i2c_client *client = to_i2c_client(dev); 519 519 struct v4l2_subdev *sd = i2c_get_clientdata(client);