diff mbox

mtd: elm: compile suspend/resume only with PM_SLEEP

Message ID 1397720349-5825-1-git-send-email-wsa@the-dreams.de
State Accepted
Commit 8d808959e4c2151f7b5960dc6dfd7b74d95c92a0
Headers show

Commit Message

Wolfram Sang April 17, 2014, 7:39 a.m. UTC
From: Wolfram Sang <wsa@sang-engineering.com>

Fixes:
drivers/mtd/devices/elm.c:480:12: warning: 'elm_suspend' defined but not used [-Wunused-function]
drivers/mtd/devices/elm.c:488:12: warning: 'elm_resume' defined but not used [-Wunused-function]

Signed-off-by: Wolfram Sang <wsa@sang-engineering.com>
---
 drivers/mtd/devices/elm.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

pekon gupta April 23, 2014, 6 a.m. UTC | #1
>From: Wolfram Sang <wsa@sang-engineering.com>
>
>Fixes:
>drivers/mtd/devices/elm.c:480:12: warning: 'elm_suspend' defined but not used [-Wunused-function]
>drivers/mtd/devices/elm.c:488:12: warning: 'elm_resume' defined but not used [-Wunused-function]
>
>Signed-off-by: Wolfram Sang <wsa@sang-engineering.com>
>---
> drivers/mtd/devices/elm.c | 2 ++
> 1 file changed, 2 insertions(+)
>
>diff --git a/drivers/mtd/devices/elm.c b/drivers/mtd/devices/elm.c
>index 1fd4a0f77967..0a037b15c11b 100644
>--- a/drivers/mtd/devices/elm.c
>+++ b/drivers/mtd/devices/elm.c
>@@ -418,6 +418,7 @@ static int elm_remove(struct platform_device *pdev)
> 	return 0;
> }
>
>+#ifdef CONFIG_PM_SLEEP
> /**
>  * elm_context_save
>  * saves ELM configurations to preserve them across Hardware powered-down
>@@ -509,6 +510,7 @@ static int elm_resume(struct device *dev)
> 	elm_context_restore(info);
> 	return 0;
> }
>+#endif
>
> static SIMPLE_DEV_PM_OPS(elm_pm_ops, elm_suspend, elm_resume);
>
>--
>1.9.1
>
Acked-by: Pekon Gupta <pekon@ti.com>

I think it's safe to mark it for stable also
CC: <stable@vger.kernel.org> # 3.12.x+

with regards, pekon
Brian Norris May 12, 2014, 8:18 p.m. UTC | #2
On Wed, Apr 23, 2014 at 06:00:58AM +0000, Pekon Gupta wrote:
> >From: Wolfram Sang <wsa@sang-engineering.com>
> >
> >Fixes:
> >drivers/mtd/devices/elm.c:480:12: warning: 'elm_suspend' defined but not used [-Wunused-function]
> >drivers/mtd/devices/elm.c:488:12: warning: 'elm_resume' defined but not used [-Wunused-function]
> >
> >Signed-off-by: Wolfram Sang <wsa@sang-engineering.com>
> >
> Acked-by: Pekon Gupta <pekon@ti.com>

Pushed to l2-mtd.git. Thanks!

> I think it's safe to mark it for stable also
> CC: <stable@vger.kernel.org> # 3.12.x+

No, build warnings are clearly clearly not candidates for -stable.

Brian
diff mbox

Patch

diff --git a/drivers/mtd/devices/elm.c b/drivers/mtd/devices/elm.c
index 1fd4a0f77967..0a037b15c11b 100644
--- a/drivers/mtd/devices/elm.c
+++ b/drivers/mtd/devices/elm.c
@@ -418,6 +418,7 @@  static int elm_remove(struct platform_device *pdev)
 	return 0;
 }
 
+#ifdef CONFIG_PM_SLEEP
 /**
  * elm_context_save
  * saves ELM configurations to preserve them across Hardware powered-down
@@ -509,6 +510,7 @@  static int elm_resume(struct device *dev)
 	elm_context_restore(info);
 	return 0;
 }
+#endif
 
 static SIMPLE_DEV_PM_OPS(elm_pm_ops, elm_suspend, elm_resume);