Commit 17a58edc authored by Kees Cook's avatar Kees Cook Committed by Dmitry Torokhov

Input: alps - convert to using 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: default avatarKees Cook <keescook@chromium.org>
Reviewed-by: default avatarPali Rohár <pali.rohar@gmail.com>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent ce23cbc8
...@@ -1587,10 +1587,10 @@ static psmouse_ret_t alps_handle_interleaved_ps2(struct psmouse *psmouse) ...@@ -1587,10 +1587,10 @@ static psmouse_ret_t alps_handle_interleaved_ps2(struct psmouse *psmouse)
return PSMOUSE_GOOD_DATA; return PSMOUSE_GOOD_DATA;
} }
static void alps_flush_packet(unsigned long data) static void alps_flush_packet(struct timer_list *t)
{ {
struct psmouse *psmouse = (struct psmouse *)data; struct alps_data *priv = from_timer(priv, t, timer);
struct alps_data *priv = psmouse->private; struct psmouse *psmouse = priv->psmouse;
serio_pause_rx(psmouse->ps2dev.serio); serio_pause_rx(psmouse->ps2dev.serio);
...@@ -2702,7 +2702,7 @@ static int alps_set_protocol(struct psmouse *psmouse, ...@@ -2702,7 +2702,7 @@ static int alps_set_protocol(struct psmouse *psmouse,
{ {
psmouse->private = priv; psmouse->private = priv;
setup_timer(&priv->timer, alps_flush_packet, (unsigned long)psmouse); timer_setup(&priv->timer, alps_flush_packet, 0);
priv->proto_version = protocol->version; priv->proto_version = protocol->version;
priv->byte0 = protocol->byte0; priv->byte0 = protocol->byte0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment