提交 94d4a1a6 编写于 作者: A Arnd Bergmann 提交者: Mauro Carvalho Chehab

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: 8a77009b ("media: ov5695: add support for OV5695 sensor")
Signed-off-by: NArnd Bergmann <arnd@arndb.de>
Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
上级 15001033
...@@ -1021,7 +1021,7 @@ static void __ov5695_power_off(struct ov5695 *ov5695) ...@@ -1021,7 +1021,7 @@ static void __ov5695_power_off(struct ov5695 *ov5695)
regulator_bulk_disable(OV5695_NUM_SUPPLIES, ov5695->supplies); regulator_bulk_disable(OV5695_NUM_SUPPLIES, ov5695->supplies);
} }
static int ov5695_runtime_resume(struct device *dev) static int __maybe_unused ov5695_runtime_resume(struct device *dev)
{ {
struct i2c_client *client = to_i2c_client(dev); struct i2c_client *client = to_i2c_client(dev);
struct v4l2_subdev *sd = i2c_get_clientdata(client); struct v4l2_subdev *sd = i2c_get_clientdata(client);
...@@ -1030,7 +1030,7 @@ static int ov5695_runtime_resume(struct device *dev) ...@@ -1030,7 +1030,7 @@ static int ov5695_runtime_resume(struct device *dev)
return __ov5695_power_on(ov5695); return __ov5695_power_on(ov5695);
} }
static int ov5695_runtime_suspend(struct device *dev) static int __maybe_unused ov5695_runtime_suspend(struct device *dev)
{ {
struct i2c_client *client = to_i2c_client(dev); struct i2c_client *client = to_i2c_client(dev);
struct v4l2_subdev *sd = i2c_get_clientdata(client); struct v4l2_subdev *sd = i2c_get_clientdata(client);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册