diff mbox

Input: st-keyscan - Protect PM-only functions by #ifdef CONFIG_PM_SLEEP

Message ID 1402513493-17613-1-git-send-email-geert@linux-m68k.org (mailing list archive)
State New, archived
Headers show

Commit Message

Geert Uytterhoeven June 11, 2014, 7:04 p.m. UTC
If CONFIG_PM_SLEEP=n:

drivers/input/keyboard/st-keyscan.c:219: warning: ‘keyscan_suspend’ defined but not used
drivers/input/keyboard/st-keyscan.c:236: warning: ‘keyscan_resume’ defined but not used

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
 drivers/input/keyboard/st-keyscan.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Gabriel FERNANDEZ June 12, 2014, 8:36 a.m. UTC | #1
Thanks Geert

Acked-by : Gabriel Fernandez <gabriel.fernandez@linaro.org>

Best Regards


On 06/11/2014 09:04 PM, Geert Uytterhoeven wrote:
> If CONFIG_PM_SLEEP=n:
>
> drivers/input/keyboard/st-keyscan.c:219: warning: ‘keyscan_suspend’ defined but not used
> drivers/input/keyboard/st-keyscan.c:236: warning: ‘keyscan_resume’ defined but not used
>
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> ---
>   drivers/input/keyboard/st-keyscan.c | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/drivers/input/keyboard/st-keyscan.c b/drivers/input/keyboard/st-keyscan.c
> index 758b48731415..668e3cf4b491 100644
> --- a/drivers/input/keyboard/st-keyscan.c
> +++ b/drivers/input/keyboard/st-keyscan.c
> @@ -215,6 +215,7 @@ static int keyscan_probe(struct platform_device *pdev)
>   	return 0;
>   }
>   
> +#ifdef CONFIG_PM_SLEEP
>   static int keyscan_suspend(struct device *dev)
>   {
>   	struct platform_device *pdev = to_platform_device(dev);
> @@ -249,6 +250,7 @@ static int keyscan_resume(struct device *dev)
>   	mutex_unlock(&input->mutex);
>   	return retval;
>   }
> +#endif /* CONFIG_PM_SLEEP */
>   
>   static SIMPLE_DEV_PM_OPS(keyscan_dev_pm_ops, keyscan_suspend, keyscan_resume);
>   

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/input/keyboard/st-keyscan.c b/drivers/input/keyboard/st-keyscan.c
index 758b48731415..668e3cf4b491 100644
--- a/drivers/input/keyboard/st-keyscan.c
+++ b/drivers/input/keyboard/st-keyscan.c
@@ -215,6 +215,7 @@  static int keyscan_probe(struct platform_device *pdev)
 	return 0;
 }
 
+#ifdef CONFIG_PM_SLEEP
 static int keyscan_suspend(struct device *dev)
 {
 	struct platform_device *pdev = to_platform_device(dev);
@@ -249,6 +250,7 @@  static int keyscan_resume(struct device *dev)
 	mutex_unlock(&input->mutex);
 	return retval;
 }
+#endif /* CONFIG_PM_SLEEP */
 
 static SIMPLE_DEV_PM_OPS(keyscan_dev_pm_ops, keyscan_suspend, keyscan_resume);