[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170104034634.3029-1-chris.packham@alliedtelesis.co.nz>
Date: Wed, 4 Jan 2017 16:46:34 +1300
From: Chris Packham <chris.packham@...iedtelesis.co.nz>
To: tglx@...utronix.de, jason@...edaemon.net, marc.zyngier@....com
Cc: lee.jones@...aro.org, linux-kernel@...r.kernel.org,
Chris Packham <chris.packham@...iedtelesis.co.nz>
Subject: [PATCH] irqchip: st: avoid compile error when PM is disabled
When power management is disabled in the kernel configuration compiler
will complain that st_irq_syscfg_resume is defined but not used. Wrap
the function definition with CONFIG_PM_SLEEP as per other users of
SIMPLE_DEV_PM_OPS.
Signed-off-by: Chris Packham <chris.packham@...iedtelesis.co.nz>
---
drivers/irqchip/irq-st.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/irqchip/irq-st.c b/drivers/irqchip/irq-st.c
index 9af48a85c16f..afec640b6d65 100644
--- a/drivers/irqchip/irq-st.c
+++ b/drivers/irqchip/irq-st.c
@@ -180,6 +180,7 @@ static int st_irq_syscfg_probe(struct platform_device *pdev)
return st_irq_syscfg_enable(pdev);
}
+#ifdef CONFIG_PM_SLEEP
static int st_irq_syscfg_resume(struct device *dev)
{
struct st_irq_syscfg *ddata = dev_get_drvdata(dev);
@@ -187,6 +188,7 @@ static int st_irq_syscfg_resume(struct device *dev)
return regmap_update_bits(ddata->regmap, ddata->syscfg,
ST_A9_IRQ_MASK, ddata->config);
}
+#endif
static SIMPLE_DEV_PM_OPS(st_irq_syscfg_pm_ops, NULL, st_irq_syscfg_resume);
--
2.11.0.24.ge6920cf
Powered by blists - more mailing lists