diff mbox series

gpio: omap: Fix warnings if PM is disabled

Message ID 20200819092445.15702-1-tony@atomide.com
State New
Headers show
Series gpio: omap: Fix warnings if PM is disabled | expand

Commit Message

Tony Lindgren Aug. 19, 2020, 9:24 a.m. UTC
Fix warnings for omap_gpio_resume and omap_gpio_suspend
defined but not used when PM is disabled as noticed when
doing make randconfig builds.

Fixes: f02a03985d06 ("gpio: omap: Add missing PM ops for suspend")
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 drivers/gpio/gpio-omap.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Grygorii Strashko Aug. 19, 2020, 11:23 a.m. UTC | #1
On 19/08/2020 12:24, Tony Lindgren wrote:
> Fix warnings for omap_gpio_resume and omap_gpio_suspend
> defined but not used when PM is disabled as noticed when
> doing make randconfig builds.
> 
> Fixes: f02a03985d06 ("gpio: omap: Add missing PM ops for suspend")
> Cc: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
>   drivers/gpio/gpio-omap.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
> --- a/drivers/gpio/gpio-omap.c
> +++ b/drivers/gpio/gpio-omap.c
> @@ -1516,7 +1516,7 @@ static int __maybe_unused omap_gpio_runtime_resume(struct device *dev)
>   	return 0;
>   }
>   
> -static int omap_gpio_suspend(struct device *dev)
> +static int __maybe_unused omap_gpio_suspend(struct device *dev)
>   {
>   	struct gpio_bank *bank = dev_get_drvdata(dev);
>   
> @@ -1528,7 +1528,7 @@ static int omap_gpio_suspend(struct device *dev)
>   	return omap_gpio_runtime_suspend(dev);
>   }
>   
> -static int omap_gpio_resume(struct device *dev)
> +static int __maybe_unused omap_gpio_resume(struct device *dev)
>   {
>   	struct gpio_bank *bank = dev_get_drvdata(dev);
>   
> 

Thank you.
Acked-by: Grygorii Strashko <grygorii.strashko@ti.com>
Bartosz Golaszewski Aug. 19, 2020, 4:16 p.m. UTC | #2
On Wed, Aug 19, 2020 at 11:24 AM Tony Lindgren <tony@atomide.com> wrote:
>
> Fix warnings for omap_gpio_resume and omap_gpio_suspend
> defined but not used when PM is disabled as noticed when
> doing make randconfig builds.
>
> Fixes: f02a03985d06 ("gpio: omap: Add missing PM ops for suspend")
> Cc: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
>  drivers/gpio/gpio-omap.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
> --- a/drivers/gpio/gpio-omap.c
> +++ b/drivers/gpio/gpio-omap.c
> @@ -1516,7 +1516,7 @@ static int __maybe_unused omap_gpio_runtime_resume(struct device *dev)
>         return 0;
>  }
>
> -static int omap_gpio_suspend(struct device *dev)
> +static int __maybe_unused omap_gpio_suspend(struct device *dev)
>  {
>         struct gpio_bank *bank = dev_get_drvdata(dev);
>
> @@ -1528,7 +1528,7 @@ static int omap_gpio_suspend(struct device *dev)
>         return omap_gpio_runtime_suspend(dev);
>  }
>
> -static int omap_gpio_resume(struct device *dev)
> +static int __maybe_unused omap_gpio_resume(struct device *dev)
>  {
>         struct gpio_bank *bank = dev_get_drvdata(dev);
>
> --
> 2.28.0

Applied for fixes, thanks!

Bartosz
diff mbox series

Patch

diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -1516,7 +1516,7 @@  static int __maybe_unused omap_gpio_runtime_resume(struct device *dev)
 	return 0;
 }
 
-static int omap_gpio_suspend(struct device *dev)
+static int __maybe_unused omap_gpio_suspend(struct device *dev)
 {
 	struct gpio_bank *bank = dev_get_drvdata(dev);
 
@@ -1528,7 +1528,7 @@  static int omap_gpio_suspend(struct device *dev)
 	return omap_gpio_runtime_suspend(dev);
 }
 
-static int omap_gpio_resume(struct device *dev)
+static int __maybe_unused omap_gpio_resume(struct device *dev)
 {
 	struct gpio_bank *bank = dev_get_drvdata(dev);