Use setup_timer() instead of init_timer() to simplify the code.
Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
INIT_LIST_HEAD(&vv->vbi_dmaq.queue);
- init_timer(&vv->vbi_dmaq.timeout);
- vv->vbi_dmaq.timeout.function = saa7146_buffer_timeout;
- vv->vbi_dmaq.timeout.data = (unsigned long)(&vv->vbi_dmaq);
+ setup_timer(&vv->vbi_dmaq.timeout, saa7146_buffer_timeout,
+ (unsigned long)(&vv->vbi_dmaq));
vv->vbi_dmaq.dev = dev;
init_waitqueue_head(&vv->vbi_wq);
{
INIT_LIST_HEAD(&vv->video_dmaq.queue);
- init_timer(&vv->video_dmaq.timeout);
- vv->video_dmaq.timeout.function = saa7146_buffer_timeout;
- vv->video_dmaq.timeout.data = (unsigned long)(&vv->video_dmaq);
+ setup_timer(&vv->video_dmaq.timeout, saa7146_buffer_timeout,
+ (unsigned long)(&vv->video_dmaq));
vv->video_dmaq.dev = dev;
/* set some default values */