diff options
| -rw-r--r-- | drivers/input/keyboard/tegra-kbc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/input/keyboard/tegra-kbc.c b/drivers/input/keyboard/tegra-kbc.c index da3828fc2c09..f270447ba951 100644 --- a/drivers/input/keyboard/tegra-kbc.c +++ b/drivers/input/keyboard/tegra-kbc.c | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 19 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 20 | */ | 20 | */ |
| 21 | 21 | ||
| 22 | #include <linux/kernel.h> | ||
| 22 | #include <linux/module.h> | 23 | #include <linux/module.h> |
| 23 | #include <linux/input.h> | 24 | #include <linux/input.h> |
| 24 | #include <linux/platform_device.h> | 25 | #include <linux/platform_device.h> |
| @@ -37,7 +38,7 @@ | |||
| 37 | #define KBC_ROW_SCAN_DLY 5 | 38 | #define KBC_ROW_SCAN_DLY 5 |
| 38 | 39 | ||
| 39 | /* KBC uses a 32KHz clock so a cycle = 1/32Khz */ | 40 | /* KBC uses a 32KHz clock so a cycle = 1/32Khz */ |
| 40 | #define KBC_CYCLE_USEC 32 | 41 | #define KBC_CYCLE_MS 32 |
| 41 | 42 | ||
| 42 | /* KBC Registers */ | 43 | /* KBC Registers */ |
| 43 | 44 | ||
| @@ -647,7 +648,7 @@ static int __devinit tegra_kbc_probe(struct platform_device *pdev) | |||
| 647 | debounce_cnt = min(pdata->debounce_cnt, KBC_MAX_DEBOUNCE_CNT); | 648 | debounce_cnt = min(pdata->debounce_cnt, KBC_MAX_DEBOUNCE_CNT); |
| 648 | scan_time_rows = (KBC_ROW_SCAN_TIME + debounce_cnt) * num_rows; | 649 | scan_time_rows = (KBC_ROW_SCAN_TIME + debounce_cnt) * num_rows; |
| 649 | kbc->repoll_dly = KBC_ROW_SCAN_DLY + scan_time_rows + pdata->repeat_cnt; | 650 | kbc->repoll_dly = KBC_ROW_SCAN_DLY + scan_time_rows + pdata->repeat_cnt; |
| 650 | kbc->repoll_dly = ((kbc->repoll_dly * KBC_CYCLE_USEC) + 999) / 1000; | 651 | kbc->repoll_dly = DIV_ROUND_UP(kbc->repoll_dly, KBC_CYCLE_MS); |
| 651 | 652 | ||
| 652 | input_dev->name = pdev->name; | 653 | input_dev->name = pdev->name; |
| 653 | input_dev->id.bustype = BUS_HOST; | 654 | input_dev->id.bustype = BUS_HOST; |
