diff options
author | Kees Cook <keescook@chromium.org> | 2017-10-24 19:40:57 +0300 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2017-10-24 20:04:44 +0300 |
commit | 4ea40278eb463aaa95889b00be78f8a56bb61131 (patch) | |
tree | 974f097739023f20473f495db31b6ffae20df826 /drivers/input/keyboard/snvs_pwrkey.c | |
parent | a11bc476b987925654369411dd8281a60cb5a175 (diff) | |
download | linux-4ea40278eb463aaa95889b00be78f8a56bb61131.tar.xz |
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/snvs_pwrkey.c')
-rw-r--r-- | drivers/input/keyboard/snvs_pwrkey.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/input/keyboard/snvs_pwrkey.c b/drivers/input/keyboard/snvs_pwrkey.c index 7544888c4749..53c768b95939 100644 --- a/drivers/input/keyboard/snvs_pwrkey.c +++ b/drivers/input/keyboard/snvs_pwrkey.c @@ -45,9 +45,9 @@ struct pwrkey_drv_data { struct input_dev *input; }; -static void imx_imx_snvs_check_for_events(unsigned long data) +static void imx_imx_snvs_check_for_events(struct timer_list *t) { - struct pwrkey_drv_data *pdata = (struct pwrkey_drv_data *) data; + struct pwrkey_drv_data *pdata = from_timer(pdata, t, check_timer); struct input_dev *input = pdata->input; u32 state; @@ -134,8 +134,7 @@ static int imx_snvs_pwrkey_probe(struct platform_device *pdev) /* clear the unexpected interrupt before driver ready */ regmap_write(pdata->snvs, SNVS_LPSR_REG, SNVS_LPSR_SPO); - setup_timer(&pdata->check_timer, - imx_imx_snvs_check_for_events, (unsigned long) pdata); + timer_setup(&pdata->check_timer, imx_imx_snvs_check_for_events, 0); input = devm_input_allocate_device(&pdev->dev); if (!input) { |