public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: geert@linux-m68k.org (Geert Uytterhoeven)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH -v2] fbdev: sh_mobile_meram: Fix defined but not used compiler warnings
Date: Wed,  6 Nov 2013 09:57:27 +0100	[thread overview]
Message-ID: <1383728247-19294-1-git-send-email-geert@linux-m68k.org> (raw)

If both CONFIG_PM_SLEEP and CONFIG_PM_RUNTIME are not set:

drivers/video/sh_mobile_meram.c:573: warning: ?sh_mobile_meram_suspend? defined but not used
drivers/video/sh_mobile_meram.c:597: warning: ?sh_mobile_meram_resume? defined but not used

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
v2: Both functions are used if CONFIG_PM_SLEEP || CONFIG_PM_RUNTIME,
    as pointed out by Laurent

 drivers/video/sh_mobile_meram.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/video/sh_mobile_meram.c b/drivers/video/sh_mobile_meram.c
index e0f098562a74..a297de5cc859 100644
--- a/drivers/video/sh_mobile_meram.c
+++ b/drivers/video/sh_mobile_meram.c
@@ -569,6 +569,7 @@ EXPORT_SYMBOL_GPL(sh_mobile_meram_cache_update);
  * Power management
  */
 
+#if defined(CONFIG_PM_SLEEP) || defined(CONFIG_PM_RUNTIME)
 static int sh_mobile_meram_suspend(struct device *dev)
 {
 	struct platform_device *pdev = to_platform_device(dev);
@@ -611,6 +612,7 @@ static int sh_mobile_meram_resume(struct device *dev)
 		meram_write_reg(priv->base, common_regs[i], priv->regs[i]);
 	return 0;
 }
+#endif /* CONFIG_PM_SLEEP || CONFIG_PM_RUNTIME */
 
 static UNIVERSAL_DEV_PM_OPS(sh_mobile_meram_dev_pm_ops,
 			    sh_mobile_meram_suspend,
-- 
1.7.9.5

             reply	other threads:[~2013-11-06  8:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-06  8:57 Geert Uytterhoeven [this message]
2013-11-06 11:57 ` [PATCH -v2] fbdev: sh_mobile_meram: Fix defined but not used compiler warnings Laurent Pinchart
2013-11-26 14:44   ` Tomi Valkeinen
2013-11-26 14:58     ` Laurent Pinchart
2013-11-26 15:00       ` Tomi Valkeinen

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=1383728247-19294-1-git-send-email-geert@linux-m68k.org \
    --to=geert@linux-m68k.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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