Commit 9e2abdd5 authored by Geliang Tang's avatar Geliang Tang Committed by Mauro Carvalho Chehab

[media] saa7134: use setup_timer

Use setup_timer() instead of init_timer() to simplify the code.
Signed-off-by: default avatarGeliang Tang <geliangtang@gmail.com>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent eef04f82
...@@ -223,9 +223,8 @@ int saa7134_ts_init1(struct saa7134_dev *dev) ...@@ -223,9 +223,8 @@ int saa7134_ts_init1(struct saa7134_dev *dev)
dev->ts.nr_packets = ts_nr_packets; dev->ts.nr_packets = ts_nr_packets;
INIT_LIST_HEAD(&dev->ts_q.queue); INIT_LIST_HEAD(&dev->ts_q.queue);
init_timer(&dev->ts_q.timeout); setup_timer(&dev->ts_q.timeout, saa7134_buffer_timeout,
dev->ts_q.timeout.function = saa7134_buffer_timeout; (unsigned long)(&dev->ts_q));
dev->ts_q.timeout.data = (unsigned long)(&dev->ts_q);
dev->ts_q.dev = dev; dev->ts_q.dev = dev;
dev->ts_q.need_two = 1; dev->ts_q.need_two = 1;
dev->ts_started = 0; dev->ts_started = 0;
......
...@@ -181,9 +181,8 @@ struct vb2_ops saa7134_vbi_qops = { ...@@ -181,9 +181,8 @@ struct vb2_ops saa7134_vbi_qops = {
int saa7134_vbi_init1(struct saa7134_dev *dev) int saa7134_vbi_init1(struct saa7134_dev *dev)
{ {
INIT_LIST_HEAD(&dev->vbi_q.queue); INIT_LIST_HEAD(&dev->vbi_q.queue);
init_timer(&dev->vbi_q.timeout); setup_timer(&dev->vbi_q.timeout, saa7134_buffer_timeout,
dev->vbi_q.timeout.function = saa7134_buffer_timeout; (unsigned long)(&dev->vbi_q));
dev->vbi_q.timeout.data = (unsigned long)(&dev->vbi_q);
dev->vbi_q.dev = dev; dev->vbi_q.dev = dev;
if (vbibufs < 2) if (vbibufs < 2)
......
...@@ -2145,9 +2145,8 @@ int saa7134_video_init1(struct saa7134_dev *dev) ...@@ -2145,9 +2145,8 @@ int saa7134_video_init1(struct saa7134_dev *dev)
dev->automute = 0; dev->automute = 0;
INIT_LIST_HEAD(&dev->video_q.queue); INIT_LIST_HEAD(&dev->video_q.queue);
init_timer(&dev->video_q.timeout); setup_timer(&dev->video_q.timeout, saa7134_buffer_timeout,
dev->video_q.timeout.function = saa7134_buffer_timeout; (unsigned long)(&dev->video_q));
dev->video_q.timeout.data = (unsigned long)(&dev->video_q);
dev->video_q.dev = dev; dev->video_q.dev = dev;
dev->fmt = format_by_fourcc(V4L2_PIX_FMT_BGR24); dev->fmt = format_by_fourcc(V4L2_PIX_FMT_BGR24);
dev->width = 720; dev->width = 720;
......
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