pinctrl: intel: Fix compilation warning when !CONFIG_PM_SLEEP
Subsystems (3)
Mika Westerberg
maintainerPATCH 1/2 pinctrl: intel: Fix compilation warning when !CONFIG_PM_SLEEP
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.
--- drivers/pinctrl/intel/pinctrl-intel.c | 40 +++++++++++++++++------------------ 1 file changed, 20 insertions(+), 20 deletions(-)
drivers/pinctrl/intel/pinctrl-intel.c +20 -20
@@ -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);
Signature · 6 lines
2.5.3 -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Mika Westerberg
maintainerPATCH 2/2 pinctrl: baytrail: Fix compilation warnings when !CONFIG_PM
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.
--- drivers/pinctrl/intel/pinctrl-baytrail.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/pinctrl/intel/pinctrl-baytrail.c +2 -0
@@ -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)
Signature · 6 lines
2.5.3 -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/2] pinctrl: baytrail: Fix compilation warnings when !CONFIG_PM
Quoted 9 lines · Mika Westerberg
When
CONFIG_PMis 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 <[email protected]>
Patch applied.
Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 8 lines · Mika Westerberg
We get following warning when
CONFIG_PM_SLEEPis not setwarning: ‘intel_gpio_irq_init’ defined but not used [-Wunused-function]
Since the function is only called from
intel_pinctrl_resume()move it insideCONFIG_PM_SLEEPguard as well.Signed-off-by Mika Westerberg <[email protected]>
Patch applied.
Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html