Commit 34445d4b authored by Kees Cook's avatar Kees Cook Committed by Dmitry Torokhov

Input: ff_memless - 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 <>
Reviewed-by: pali's avatarPali Rohár <>
Signed-off-by: default avatarDmitry Torokhov <>
parent 17a58edc
......@@ -412,10 +412,10 @@ static void ml_play_effects(struct ml_device *ml)
static void ml_effect_timer(unsigned long timer_data)
static void ml_effect_timer(struct timer_list *t)
struct input_dev *dev = (struct input_dev *)timer_data;
struct ml_device *ml = dev->ff->private;
struct ml_device *ml = from_timer(ml, t, timer);
struct input_dev *dev = ml->dev;
unsigned long flags;
pr_debug("timer: updating effects\n");
......@@ -526,7 +526,7 @@ int input_ff_create_memless(struct input_dev *dev, void *data,
ml->private = data;
ml->play_effect = play_effect;
ml->gain = 0xffff;
setup_timer(&ml->timer, ml_effect_timer, (unsigned long)dev);
timer_setup(&ml->timer, ml_effect_timer, 0);
set_bit(FF_GAIN, dev->ffbit);
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