From: Chris Packham <chris.packham@alliedtelesis.co.nz>
To: tglx@linutronix.de, jason@lakedaemon.net, marc.zyngier@arm.com
Cc: lee.jones@linaro.org, linux-kernel@vger.kernel.org,
Chris Packham <chris.packham@alliedtelesis.co.nz>
Subject: [PATCH] irqchip: st: avoid compile error when PM is disabled
Date: Wed, 4 Jan 2017 16:46:34 +1300 [thread overview]
Message-ID: <20170104034634.3029-1-chris.packham@alliedtelesis.co.nz> (raw)
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
next reply other threads:[~2017-01-04 3:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-04 3:46 Chris Packham [this message]
2017-01-09 14:16 ` Thomas Gleixner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170104034634.3029-1-chris.packham@alliedtelesis.co.nz \
--to=chris.packham@alliedtelesis.co.nz \
--cc=jason@lakedaemon.net \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®