diff options
-rwxr-xr-x | arch/arm/mach-tegra/board-nvodm.c | 1 | ||||
-rwxr-xr-x | drivers/input/keyboard/tegra-kbc.c | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm/mach-tegra/board-nvodm.c b/arch/arm/mach-tegra/board-nvodm.c index bb3efa86bf20..029c432dba37 100755 --- a/arch/arm/mach-tegra/board-nvodm.c +++ b/arch/arm/mach-tegra/board-nvodm.c @@ -726,6 +726,7 @@ static noinline void __init tegra_setup_kbc(void) pr_err("%s: out of memory for key mapping\n", __func__); return; } + pdata->wake_cnt = 0; if (NvOdmKbcIsSelectKeysWkUpEnabled(&wake_row, &wake_col, &wake_num)) { BUG_ON(!wake_num || wake_num>=KBC_MAX_KEY); pdata->wake_cfg = kzalloc(sizeof(*pdata->wake_cfg)*wake_num, diff --git a/drivers/input/keyboard/tegra-kbc.c b/drivers/input/keyboard/tegra-kbc.c index 7797b47b78a0..2c69cf710259 100755 --- a/drivers/input/keyboard/tegra-kbc.c +++ b/drivers/input/keyboard/tegra-kbc.c @@ -79,7 +79,7 @@ static int tegra_kbc_suspend(struct platform_device *pdev, pm_message_t state) { struct tegra_kbc *kbc = platform_get_drvdata(pdev); - if (device_may_wakeup(&pdev->dev)) { + if (device_may_wakeup(&pdev->dev) && kbc->pdata->wake_cnt) { tegra_kbc_setup_wakekeys(kbc, true); enable_irq_wake(kbc->irq); tegra_configure_dpd_kbc(kbc->wake_enable_rows, kbc->wake_enable_cols); @@ -97,7 +97,7 @@ static int tegra_kbc_resume(struct platform_device *pdev) { struct tegra_kbc *kbc = platform_get_drvdata(pdev); - if (device_may_wakeup(&pdev->dev)) { + if (device_may_wakeup(&pdev->dev) && kbc->pdata->wake_cnt) { disable_irq_wake(kbc->irq); tegra_kbc_setup_wakekeys(kbc, false); tegra_configure_dpd_kbc(0, 0); |