MLK-22302-4: input: keyboard: pf1550_onkey: fix build warning with CONFIG_PM_SLEEP=n
authorRobin Gong <yibin.gong@nxp.com>
Tue, 23 Jul 2019 15:55:43 +0000 (23:55 +0800)
committerRobin Gong <yibin.gong@nxp.com>
Tue, 23 Jul 2019 16:50:48 +0000 (00:50 +0800)
Fix build waring with CONFIG_PM_SLEEP=n.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Andy Duan <fugang.duan@nxp.com>
(cherry picked from commit fc6b26798579676f259aede42fb4aaecef9599ea)

drivers/input/keyboard/pf1550_onkey.c

index 2ba0d15..54280c1 100644 (file)
@@ -150,6 +150,7 @@ static int pf1550_onkey_probe(struct platform_device *pdev)
        return 0;
 }
 
+#ifdef CONFIG_PM_SLEEP
 static int pf1550_onkey_suspend(struct device *dev)
 {
        struct platform_device *pdev = to_platform_device(dev);
@@ -181,6 +182,7 @@ static int pf1550_onkey_resume(struct device *dev)
 
        return 0;
 }
+#endif
 
 static const struct of_device_id pf1550_onkey_ids[] = {
        { .compatible = "fsl,pf1550-onkey" },