Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit af2e14bb authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Mauro Carvalho Chehab
Browse files

[media] vsp1: use __maybe_unused for PM handlers



Building without CONFIG_PM results in a harmless warning from
slightly incorrect #ifdef guards:

drivers/media/platform/vsp1/vsp1_drv.c:525:12: error: 'vsp1_pm_runtime_resume' defined but not used [-Werror=unused-function]
drivers/media/platform/vsp1/vsp1_drv.c:516:12: error: 'vsp1_pm_runtime_suspend' defined but not used [-Werror=unused-function]

This removes the existing #ifdef and instead marks all four
PM functions as __maybe_unused.

Fixes: 1e6af546 ("[media] v4l: vsp1: Implement runtime PM support")

Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent c9a3429b
Loading
Loading
Loading
Loading
+4 −6
Original line number Original line Diff line number Diff line
@@ -504,8 +504,7 @@ void vsp1_device_put(struct vsp1_device *vsp1)
 * Power Management
 * Power Management
 */
 */


#ifdef CONFIG_PM_SLEEP
static int __maybe_unused vsp1_pm_suspend(struct device *dev)
static int vsp1_pm_suspend(struct device *dev)
{
{
	struct vsp1_device *vsp1 = dev_get_drvdata(dev);
	struct vsp1_device *vsp1 = dev_get_drvdata(dev);


@@ -515,7 +514,7 @@ static int vsp1_pm_suspend(struct device *dev)
	return 0;
	return 0;
}
}


static int vsp1_pm_resume(struct device *dev)
static int __maybe_unused vsp1_pm_resume(struct device *dev)
{
{
	struct vsp1_device *vsp1 = dev_get_drvdata(dev);
	struct vsp1_device *vsp1 = dev_get_drvdata(dev);


@@ -524,9 +523,8 @@ static int vsp1_pm_resume(struct device *dev)


	return 0;
	return 0;
}
}
#endif


static int vsp1_pm_runtime_suspend(struct device *dev)
static int __maybe_unused vsp1_pm_runtime_suspend(struct device *dev)
{
{
	struct vsp1_device *vsp1 = dev_get_drvdata(dev);
	struct vsp1_device *vsp1 = dev_get_drvdata(dev);


@@ -535,7 +533,7 @@ static int vsp1_pm_runtime_suspend(struct device *dev)
	return 0;
	return 0;
}
}


static int vsp1_pm_runtime_resume(struct device *dev)
static int __maybe_unused vsp1_pm_runtime_resume(struct device *dev)
{
{
	struct vsp1_device *vsp1 = dev_get_drvdata(dev);
	struct vsp1_device *vsp1 = dev_get_drvdata(dev);
	int ret;
	int ret;