* [PATCH 1/2] pinctrl: intel: Fix compilation warning when !CONFIG_PM_SLEEP
@ 2015-10-13 14:51 Mika Westerberg
2015-10-13 14:51 ` [PATCH 2/2] pinctrl: baytrail: Fix compilation warnings when !CONFIG_PM Mika Westerberg
2015-10-16 20:54 ` [PATCH 1/2] pinctrl: intel: Fix compilation warning when !CONFIG_PM_SLEEP Linus Walleij
0 siblings, 2 replies; 4+ messages in thread
From: Mika Westerberg @ 2015-10-13 14:51 UTC (permalink / raw)
To: Linus Walleij; +Cc: Heikki Krogerus, Mathias Nyman, Mika Westerberg, linux-gpio
We get following warning when CONFIG_PM_SLEEP is not set
warning: ‘intel_gpio_irq_init’ defined but not used [-Wunused-function]
Since the function is only called from intel_pinctrl_resume() move it
inside CONFIG_PM_SLEEP guard as well.
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
---
drivers/pinctrl/intel/pinctrl-intel.c | 40 +++++++++++++++++------------------
1 file changed, 20 insertions(+), 20 deletions(-)
diff --git a/drivers/pinctrl/intel/pinctrl-intel.c b/drivers/pinctrl/intel/pinctrl-intel.c
index 54848b8decef..613ba1b1e0b7 100644
--- a/drivers/pinctrl/intel/pinctrl-intel.c
+++ b/drivers/pinctrl/intel/pinctrl-intel.c
@@ -861,26 +861,6 @@ static struct irq_chip intel_gpio_irqchip = {
.irq_set_wake = intel_gpio_irq_wake,
};
-static void intel_gpio_irq_init(struct intel_pinctrl *pctrl)
-{
- size_t i;
-
- for (i = 0; i < pctrl->ncommunities; i++) {
- const struct intel_community *community;
- void __iomem *base;
- unsigned gpp;
-
- community = &pctrl->communities[i];
- base = community->regs;
-
- for (gpp = 0; gpp < community->ngpps; gpp++) {
- /* Mask and clear all interrupts */
- writel(0, base + community->ie_offset + gpp * 4);
- writel(0xffff, base + GPI_IS + gpp * 4);
- }
- }
-}
-
static int intel_gpio_probe(struct intel_pinctrl *pctrl, int irq)
{
int ret;
@@ -1087,6 +1067,26 @@ int intel_pinctrl_suspend(struct device *dev)
}
EXPORT_SYMBOL_GPL(intel_pinctrl_suspend);
+static void intel_gpio_irq_init(struct intel_pinctrl *pctrl)
+{
+ size_t i;
+
+ for (i = 0; i < pctrl->ncommunities; i++) {
+ const struct intel_community *community;
+ void __iomem *base;
+ unsigned gpp;
+
+ community = &pctrl->communities[i];
+ base = community->regs;
+
+ for (gpp = 0; gpp < community->ngpps; gpp++) {
+ /* Mask and clear all interrupts */
+ writel(0, base + community->ie_offset + gpp * 4);
+ writel(0xffff, base + GPI_IS + gpp * 4);
+ }
+ }
+}
+
int intel_pinctrl_resume(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
--
2.5.3
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] pinctrl: baytrail: Fix compilation warnings when !CONFIG_PM
2015-10-13 14:51 [PATCH 1/2] pinctrl: intel: Fix compilation warning when !CONFIG_PM_SLEEP Mika Westerberg
@ 2015-10-13 14:51 ` Mika Westerberg
2015-10-16 20:54 ` Linus Walleij
2015-10-16 20:54 ` [PATCH 1/2] pinctrl: intel: Fix compilation warning when !CONFIG_PM_SLEEP Linus Walleij
1 sibling, 1 reply; 4+ messages in thread
From: Mika Westerberg @ 2015-10-13 14:51 UTC (permalink / raw)
To: Linus Walleij; +Cc: Heikki Krogerus, Mathias Nyman, Mika Westerberg, linux-gpio
When CONFIG_PM is not set we get following compilation warnings:
warning: ‘byt_gpio_runtime_suspend’ defined but not used [-Wunused-function]
warning: ‘byt_gpio_runtime_resume’ defined but not used [-Wunused-function]
Fix this by guarding byt_gpio_runtime_suspend()/byt_gpio_runtime_resume()
with #ifdef CONFIG_PM.
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
---
drivers/pinctrl/intel/pinctrl-baytrail.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/pinctrl/intel/pinctrl-baytrail.c b/drivers/pinctrl/intel/pinctrl-baytrail.c
index f79ea430f651..b59ce75b1947 100644
--- a/drivers/pinctrl/intel/pinctrl-baytrail.c
+++ b/drivers/pinctrl/intel/pinctrl-baytrail.c
@@ -696,6 +696,7 @@ static int byt_gpio_resume(struct device *dev)
}
#endif
+#ifdef CONFIG_PM
static int byt_gpio_runtime_suspend(struct device *dev)
{
return 0;
@@ -705,6 +706,7 @@ static int byt_gpio_runtime_resume(struct device *dev)
{
return 0;
}
+#endif
static const struct dev_pm_ops byt_gpio_pm_ops = {
SET_LATE_SYSTEM_SLEEP_PM_OPS(byt_gpio_suspend, byt_gpio_resume)
--
2.5.3
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] pinctrl: intel: Fix compilation warning when !CONFIG_PM_SLEEP
2015-10-13 14:51 [PATCH 1/2] pinctrl: intel: Fix compilation warning when !CONFIG_PM_SLEEP Mika Westerberg
2015-10-13 14:51 ` [PATCH 2/2] pinctrl: baytrail: Fix compilation warnings when !CONFIG_PM Mika Westerberg
@ 2015-10-16 20:54 ` Linus Walleij
1 sibling, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2015-10-16 20:54 UTC (permalink / raw)
To: Mika Westerberg
Cc: Heikki Krogerus, Mathias Nyman, linux-gpio@vger.kernel.org
On Tue, Oct 13, 2015 at 4:51 PM, Mika Westerberg
<mika.westerberg@linux.intel.com> wrote:
> We get following warning when CONFIG_PM_SLEEP is not set
>
> warning: ‘intel_gpio_irq_init’ defined but not used [-Wunused-function]
>
> Since the function is only called from intel_pinctrl_resume() move it
> inside CONFIG_PM_SLEEP guard as well.
>
> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Patch applied.
Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] pinctrl: baytrail: Fix compilation warnings when !CONFIG_PM
2015-10-13 14:51 ` [PATCH 2/2] pinctrl: baytrail: Fix compilation warnings when !CONFIG_PM Mika Westerberg
@ 2015-10-16 20:54 ` Linus Walleij
0 siblings, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2015-10-16 20:54 UTC (permalink / raw)
To: Mika Westerberg
Cc: Heikki Krogerus, Mathias Nyman, linux-gpio@vger.kernel.org
On Tue, Oct 13, 2015 at 4:51 PM, Mika Westerberg
<mika.westerberg@linux.intel.com> wrote:
> When CONFIG_PM is not set we get following compilation warnings:
>
> warning: ‘byt_gpio_runtime_suspend’ defined but not used [-Wunused-function]
> warning: ‘byt_gpio_runtime_resume’ defined but not used [-Wunused-function]
>
> Fix this by guarding byt_gpio_runtime_suspend()/byt_gpio_runtime_resume()
> with #ifdef CONFIG_PM.
>
> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Patch applied.
Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-10-16 20:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-13 14:51 [PATCH 1/2] pinctrl: intel: Fix compilation warning when !CONFIG_PM_SLEEP Mika Westerberg
2015-10-13 14:51 ` [PATCH 2/2] pinctrl: baytrail: Fix compilation warnings when !CONFIG_PM Mika Westerberg
2015-10-16 20:54 ` Linus Walleij
2015-10-16 20:54 ` [PATCH 1/2] pinctrl: intel: Fix compilation warning when !CONFIG_PM_SLEEP Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).