Re: [PATCH] Input: imx_keypad - Place SIMPLE_DEV_PM_OPS inside CONFIG_PM_SLEEP if block

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday, April 10, 2013 10:28:22 PM Dmitry Torokhov wrote:
> Fabio Estevam <festevam@xxxxxxxxx> wrote:
> >From: Fabio Estevam <fabio.estevam@xxxxxxxxxxxxx>
> >
> >SIMPLE_DEV_PM_OPS should be inside the CONFIG_PM_SLEEP 'if' block
> >because
> >imx_kbd_suspend and imx_kbd_resume definitions are inside this block.
> 
> No, it does not. It compiles just fine if CONFIG_PM_SLEEP is not defined.
> 
> >While at it, also add a definition for IMX_KBD_PM_OPS, which can handle
> >the case
> >when CONFIG_PM_SLEEP is not selected.
> >
> >Signed-off-by: Fabio Estevam <fabio.estevam@xxxxxxxxxxxxx>
> >---
> >
> > drivers/input/keyboard/imx_keypad.c |    8 +++++---
> > 1 file changed, 5 insertions(+), 3 deletions(-)
> >
> >diff --git a/drivers/input/keyboard/imx_keypad.c
> >b/drivers/input/keyboard/imx_keypad.c
> >index 03c8cc5..2663c91 100644
> >--- a/drivers/input/keyboard/imx_keypad.c
> >+++ b/drivers/input/keyboard/imx_keypad.c
> >
> >@@ -580,15 +580,17 @@ err_clk:
> > 	return ret;
> > 
> > }
> >
> >-#endif
> >-
> >static SIMPLE_DEV_PM_OPS(imx_kbd_pm_ops, imx_kbd_suspend,
> >imx_kbd_resume);
> >+#define IMX_KBD_PM_OPS (&imx_kbd_pm_ops)
> >+#else
> >+#define IMX_KBD_PM_OPS NULL
> >+#endif /* CONFIG_PM_SLEEP */
> >
> > static struct platform_driver imx_keypad_driver = {
> > 
> > 	.driver		= {
> > 	
> > 		.name	= "imx-keypad",
> > 		.owner	= THIS_MODULE,
> >
> >-		.pm	= &imx_kbd_pm_ops,
> >+		.pm	= IMX_KBD_PM_OPS,
> >
> > 		.of_match_table = of_match_ptr(imx_keypad_of_match),
> > 	
> > 	},
> > 	.probe		= imx_keypad_probe,
> 
> Hi Fabio,
> Thanks.

Hmm, K-9's quoting style is really peculiar...

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




[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux