diff options
author | Geliang Tang | 2017-04-09 03:33:58 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab | 2017-04-10 19:46:12 +0200 |
commit | d5d116c4db4f98e818e664fd62d011062e25b12e (patch) | |
tree | 93b750d069692d8dbe1f2ab6a01a4ba8ef43b938 /drivers/media/common/saa7146 | |
parent | [media] saa7134: use setup_timer (diff) | |
download | kernel-qcow2-linux-d5d116c4db4f98e818e664fd62d011062e25b12e.tar.gz kernel-qcow2-linux-d5d116c4db4f98e818e664fd62d011062e25b12e.tar.xz kernel-qcow2-linux-d5d116c4db4f98e818e664fd62d011062e25b12e.zip |
[media] saa7146: use setup_timer
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>
Diffstat (limited to 'drivers/media/common/saa7146')
-rw-r--r-- | drivers/media/common/saa7146/saa7146_vbi.c | 5 | ||||
-rw-r--r-- | drivers/media/common/saa7146/saa7146_video.c | 5 |
2 files changed, 4 insertions, 6 deletions
diff --git a/drivers/media/common/saa7146/saa7146_vbi.c b/drivers/media/common/saa7146/saa7146_vbi.c index 49237518d65f..3553ac4cba5c 100644 --- a/drivers/media/common/saa7146/saa7146_vbi.c +++ b/drivers/media/common/saa7146/saa7146_vbi.c @@ -365,9 +365,8 @@ static void vbi_init(struct saa7146_dev *dev, struct saa7146_vv *vv) 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); diff --git a/drivers/media/common/saa7146/saa7146_video.c b/drivers/media/common/saa7146/saa7146_video.c index e034bcfcf757..b3b29d4f36ed 100644 --- a/drivers/media/common/saa7146/saa7146_video.c +++ b/drivers/media/common/saa7146/saa7146_video.c @@ -1201,9 +1201,8 @@ static void video_init(struct saa7146_dev *dev, struct saa7146_vv *vv) { 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 */ |