diff options
author | Kees Cook <keescook@chromium.org> | 2017-10-24 09:40:57 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2017-10-24 10:04:44 -0700 |
commit | 4ea40278eb463aaa95889b00be78f8a56bb61131 (patch) | |
tree | 974f097739023f20473f495db31b6ffae20df826 /drivers/input/keyboard/tegra-kbc.c | |
parent | a11bc476b987925654369411dd8281a60cb5a175 (diff) | |
download | talos-obmc-linux-4ea40278eb463aaa95889b00be78f8a56bb61131.tar.gz talos-obmc-linux-4ea40278eb463aaa95889b00be78f8a56bb61131.zip |
Input: keyboard - convert timers to use timer_setup()
In preparation for unconditionally passing the struct timer_list pointer to
all timer callbacks, switch to using the new timer_setup() and from_timer()
to pass the timer pointer explicitly.
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/keyboard/tegra-kbc.c')
-rw-r--r-- | drivers/input/keyboard/tegra-kbc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/input/keyboard/tegra-kbc.c b/drivers/input/keyboard/tegra-kbc.c index edc1385ca00b..875205f445b5 100644 --- a/drivers/input/keyboard/tegra-kbc.c +++ b/drivers/input/keyboard/tegra-kbc.c @@ -251,9 +251,9 @@ static void tegra_kbc_set_fifo_interrupt(struct tegra_kbc *kbc, bool enable) writel(val, kbc->mmio + KBC_CONTROL_0); } -static void tegra_kbc_keypress_timer(unsigned long data) +static void tegra_kbc_keypress_timer(struct timer_list *t) { - struct tegra_kbc *kbc = (struct tegra_kbc *)data; + struct tegra_kbc *kbc = from_timer(kbc, t, timer); unsigned long flags; u32 val; unsigned int i; @@ -655,7 +655,7 @@ static int tegra_kbc_probe(struct platform_device *pdev) return -ENOMEM; } - setup_timer(&kbc->timer, tegra_kbc_keypress_timer, (unsigned long)kbc); + timer_setup(&kbc->timer, tegra_kbc_keypress_timer, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0); kbc->mmio = devm_ioremap_resource(&pdev->dev, res); |