diff options
author | Kees Cook | 2017-09-21 01:27:41 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab | 2017-10-04 21:59:47 +0200 |
commit | d17dd2db943272b6d9d1315528cde9dad74fa6ed (patch) | |
tree | 84d666dba3d4844703642ce0c78c1a1b4e53fbcb /drivers/media/i2c/tc358743.c | |
parent | [media] vivid: add support for Y10 and Y12 (diff) | |
download | kernel-qcow2-linux-d17dd2db943272b6d9d1315528cde9dad74fa6ed.tar.gz kernel-qcow2-linux-d17dd2db943272b6d9d1315528cde9dad74fa6ed.tar.xz kernel-qcow2-linux-d17dd2db943272b6d9d1315528cde9dad74fa6ed.zip |
[media] media/i2c/tc358743: Initialize timer
This converts to use setup_timer() to set callback and data, though it
doesn't look like this would have worked with timer checking enabled
since no init_timer() was ever called before.
Cc: Mats Randgaard <matrandg@cisco.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/i2c/tc358743.c')
-rw-r--r-- | drivers/media/i2c/tc358743.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/i2c/tc358743.c b/drivers/media/i2c/tc358743.c index e1d8eef7055e..a9355032076f 100644 --- a/drivers/media/i2c/tc358743.c +++ b/drivers/media/i2c/tc358743.c @@ -2147,8 +2147,8 @@ static int tc358743_probe(struct i2c_client *client, } else { INIT_WORK(&state->work_i2c_poll, tc358743_work_i2c_poll); - state->timer.data = (unsigned long)state; - state->timer.function = tc358743_irq_poll_timer; + setup_timer(&state->timer, tc358743_irq_poll_timer, + (unsigned long)state); state->timer.expires = jiffies + msecs_to_jiffies(POLL_INTERVAL_MS); add_timer(&state->timer); |