lkml.org 
[lkml]   [2017]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] irqchip: st: avoid compile error when PM is disabled
Date
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@alliedtelesis.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
\
 
 \ /
  Last update: 2017-01-04 04:47    [W:0.035 / U:0.508 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site