input: cros_ec_keyb_clear_keyboard() depends on CONFIG_PM_SLEEP
Subsystems (3)
PATCH 1/1 input: cros_ec_keyb_clear_keyboard() depends on CONFIG_PM_SLEEP
If CONFIG_PM_SLEEP is not set:
drivers/input/keyboard/cros_ec_keyb.c:211: warning: ‘cros_ec_keyb_clear_keyboard’ defined but not used
Move the definition of cros_ec_keyb_clear_keyboard() inside the section protected by #ifdef CONFIG_PM_SLEEP to fix this.
--- drivers/input/keyboard/cros_ec_keyb.c | 54 ++++++++++++++++---------------- 1 files changed, 27 insertions(+), 27 deletions(-)
drivers/input/keyboard/cros_ec_keyb.c +27 -27
@@ -206,33 +206,6 @@ static int cros_ec_keyb_work(struct notifier_block *nb,return NOTIFY_DONE ; } -/* Clear any keys in the buffer */ -static void cros_ec_keyb_clear_keyboard (struct cros_ec_keyb *ckdev) -{ -uint8_t old_state[ckdev->cols]; -uint8_t new_state[ckdev->cols]; -unsigned long duration; -int i, ret; - -/* -* Keep reading until we see that the scan state does not change. -* That indicates that we are done. -* -* Assume that the EC keyscan buffer is at most 32 deep. -*/ - duration = jiffies; - ret =cros_ec_keyb_get_state (ckdev, new_state); -for (i =1 ; !ret && i <32 ; i++) { -memcpy (old_state, new_state,sizeof (old_state)); - ret =cros_ec_keyb_get_state (ckdev, new_state); -if (0 ==memcmp (old_state, new_state,sizeof (old_state))) -break ; - } - duration = jiffies - duration; -dev_info (ckdev->dev,"Discarded %d keyscan(s) in %dus\n" , i, -jiffies_to_usecs (duration)); -} -static int cros_ec_keyb_probe (struct platform_device *pdev) {struct cros_ec_device *ec =dev_get_drvdata (pdev->dev.parent);
@@ -299,6 +272,33 @@ static int cros_ec_keyb_probe(struct platform_device *pdev) }#ifdef CONFIG_PM_SLEEP +/* Clear any keys in the buffer */ +static void cros_ec_keyb_clear_keyboard (struct cros_ec_keyb *ckdev) +{ +uint8_t old_state[ckdev->cols]; +uint8_t new_state[ckdev->cols]; +unsigned long duration; +int i, ret; + +/* +* Keep reading until we see that the scan state does not change. +* That indicates that we are done. +* +* Assume that the EC keyscan buffer is at most 32 deep. +*/ + duration = jiffies; + ret =cros_ec_keyb_get_state (ckdev, new_state); +for (i =1 ; !ret && i <32 ; i++) { +memcpy (old_state, new_state,sizeof (old_state)); + ret =cros_ec_keyb_get_state (ckdev, new_state); +if (0 ==memcmp (old_state, new_state,sizeof (old_state))) +break ; + } + duration = jiffies - duration; +dev_info (ckdev->dev,"Discarded %d keyscan(s) in %dus\n" , i, +jiffies_to_usecs (duration)); +} +static int cros_ec_keyb_resume (struct device *dev) {struct cros_ec_keyb *ckdev =dev_get_drvdata (dev);
Signature · 6 lines
1.7.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 8 lines · Geert Uytterhoeven
If
CONFIG_PM_SLEEPis not set:
drivers/input/keyboard/cros_ec_keyb.c:211: warning: ‘cros_ec_keyb_clear_keyboard’ defined but not usedMove the definition of
cros_ec_keyb_clear_keyboard()inside the section protected by #ifdefCONFIG_PM_SLEEPto fix this.Signed-off-by Geert Uytterhoeven <[email protected]>
Quoted 11 lines · Simon Glass
Quoted 8 lines · Geert Uytterhoeven
If
CONFIG_PM_SLEEPis not set:
drivers/input/keyboard/cros_ec_keyb.c:211: warning: ‘cros_ec_keyb_clear_keyboard’ defined but not usedMove the definition of
cros_ec_keyb_clear_keyboard()inside the section protected by #ifdefCONFIG_PM_SLEEPto fix this.Signed-off-by Geert Uytterhoeven <[email protected]>Acked-by Simon Glass <[email protected]>
Could you please forward this to Linus as I do not have this driver in my branch yet.
Thanks.
Signature · 5 lines
Dmitry -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Dmitry,
Quoted 9 lines · Dmitry Torokhov
Quoted 8 lines · Simon Glass
Quoted 7 lines · Geert Uytterhoeven
If
CONFIG_PM_SLEEPis not set:
drivers/input/keyboard/cros_ec_keyb.c:211: warning: ‘cros_ec_keyb_clear_keyboard’ defined but not usedMove the definition of
cros_ec_keyb_clear_keyboard()inside the section protected by #ifdefCONFIG_PM_SLEEPto fix this.
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Geert Uytterhoeven <[email protected]>Acked-by Simon Glass <[email protected]>Acked-by Dmitry Torokhov <[email protected]>Could you please forward this to Linus as I do not have this driver in my branch yet.
I guess you took that one now ? Or are you expecting me to merge it ?
Cheers,
Samuel.
Signature · 6 lines
Intel Open Source Technology Centre http://oss.intel.com/ -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 12 lines · Samuel Ortiz
Quoted 11 lines · Dmitry Torokhov
Quoted 10 lines · Simon Glass
Quoted 8 lines · Geert Uytterhoeven
If
CONFIG_PM_SLEEPis not set:
drivers/input/keyboard/cros_ec_keyb.c:211: warning: ‘cros_ec_keyb_clear_keyboard’ defined but not usedMove the definition of
cros_ec_keyb_clear_keyboard()inside the section protected by #ifdefCONFIG_PM_SLEEPto fix this.Signed-off-by Geert Uytterhoeven <[email protected]>
Quoted 7 lines
Quoted 6 lines
Quoted 1 line
Acked-by Simon Glass <[email protected]>Acked-by Dmitry Torokhov <[email protected]>Could you please forward this to Linus as I do not have this driver in my branch yet.
I guess you took that one now ? Or are you expecting me to merge it ?
FWIW, I also have it in my exotic-arch-fixes branch, now destined for 3.11.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html