diff mbox

Input: imx_keypad - Place SIMPLE_DEV_PM_OPS inside CONFIG_PM_SLEEP if block

Message ID CAOMZO5C_QW_BWCqNufs7BT5Cx4OZMULp0vvqOUfL3Y5nME14GQ@mail.gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Fabio Estevam April 11, 2013, 2:17 p.m. UTC
Hi Dmitry,

On Thu, Apr 11, 2013 at 2:28 AM, Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:
> Fabio Estevam <festevam@gmail.com> wrote:
>
>>From: Fabio Estevam <fabio.estevam@freescale.com>
>>
>>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.

I am not sure how to disable CONFIG_PM_SLEEP properly in the
defconfig, but I did this quick test to simulate it:



and then I see:

  CC      drivers/input/keyboard/imx_keypad.o
drivers/input/keyboard/imx_keypad.c:585: error: 'imx_kbd_suspend'
undeclared here (not in a function)
drivers/input/keyboard/imx_keypad.c:585: error: 'imx_kbd_resume'
undeclared here (not in a function)
make[3]: *** [drivers/input/keyboard/imx_keypad.o] Error 1
make[2]: *** [drivers/input/keyboard] Error 2
--
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

Comments

Dmitry Torokhov April 11, 2013, 2:45 p.m. UTC | #1
Fabio Estevam <festevam@gmail.com> wrote:

>Hi Dmitry,
>
>On Thu, Apr 11, 2013 at 2:28 AM, Dmitry Torokhov
><dmitry.torokhov@gmail.com> wrote:
>> Fabio Estevam <festevam@gmail.com> wrote:
>>
>>>From: Fabio Estevam <fabio.estevam@freescale.com>
>>>
>>>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.
>
>I am not sure how to disable CONFIG_PM_SLEEP properly in the
>defconfig, but I did this quick test to simulate it:
>
>--- a/drivers/input/keyboard/imx_keypad.c
>+++ b/drivers/input/keyboard/imx_keypad.c
>@@ -536,7 +536,7 @@ static int imx_keypad_probe(struct platform_device
>*pdev)
>        return 0;
> }
>
>-#ifdef CONFIG_PM_SLEEP
>+#if 0

This is not the same thing as SIMPLE_DEV_PM_OPS change their definition depending on CONFIG_PM_SLEEP.


Thanks.
diff mbox

Patch

--- a/drivers/input/keyboard/imx_keypad.c
+++ b/drivers/input/keyboard/imx_keypad.c
@@ -536,7 +536,7 @@  static int imx_keypad_probe(struct platform_device *pdev)
        return 0;
 }

-#ifdef CONFIG_PM_SLEEP
+#if 0
 static int imx_kbd_suspend(struct device *dev)
 {
        struct platform_device *pdev = to_platform_device(dev);