linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/12] [media] saa7134: use setup_timer
@ 2017-04-09  1:33 Geliang Tang
  2017-04-09  1:33 ` [PATCH 02/12] [media] saa7146: " Geliang Tang
                   ` (10 more replies)
  0 siblings, 11 replies; 13+ messages in thread
From: Geliang Tang @ 2017-04-09  1:33 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Hans Verkuil, Laurent Pinchart
  Cc: Geliang Tang, linux-media, linux-kernel

Use setup_timer() instead of init_timer() to simplify the code.

Signed-off-by: Geliang Tang <geliangtang@gmail.com>
---
 drivers/media/pci/saa7134/saa7134-ts.c    | 5 ++---
 drivers/media/pci/saa7134/saa7134-vbi.c   | 5 ++---
 drivers/media/pci/saa7134/saa7134-video.c | 5 ++---
 3 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/drivers/media/pci/saa7134/saa7134-ts.c b/drivers/media/pci/saa7134/saa7134-ts.c
index 578e03f..7414878 100644
--- a/drivers/media/pci/saa7134/saa7134-ts.c
+++ b/drivers/media/pci/saa7134/saa7134-ts.c
@@ -223,9 +223,8 @@ int saa7134_ts_init1(struct saa7134_dev *dev)
 	dev->ts.nr_packets = ts_nr_packets;
 
 	INIT_LIST_HEAD(&dev->ts_q.queue);
-	init_timer(&dev->ts_q.timeout);
-	dev->ts_q.timeout.function = saa7134_buffer_timeout;
-	dev->ts_q.timeout.data     = (unsigned long)(&dev->ts_q);
+	setup_timer(&dev->ts_q.timeout, saa7134_buffer_timeout,
+		    (unsigned long)(&dev->ts_q));
 	dev->ts_q.dev              = dev;
 	dev->ts_q.need_two         = 1;
 	dev->ts_started            = 0;
diff --git a/drivers/media/pci/saa7134/saa7134-vbi.c b/drivers/media/pci/saa7134/saa7134-vbi.c
index 4619337..bcad9b2 100644
--- a/drivers/media/pci/saa7134/saa7134-vbi.c
+++ b/drivers/media/pci/saa7134/saa7134-vbi.c
@@ -181,9 +181,8 @@ struct vb2_ops saa7134_vbi_qops = {
 int saa7134_vbi_init1(struct saa7134_dev *dev)
 {
 	INIT_LIST_HEAD(&dev->vbi_q.queue);
-	init_timer(&dev->vbi_q.timeout);
-	dev->vbi_q.timeout.function = saa7134_buffer_timeout;
-	dev->vbi_q.timeout.data     = (unsigned long)(&dev->vbi_q);
+	setup_timer(&dev->vbi_q.timeout, saa7134_buffer_timeout,
+		    (unsigned long)(&dev->vbi_q));
 	dev->vbi_q.dev              = dev;
 
 	if (vbibufs < 2)
diff --git a/drivers/media/pci/saa7134/saa7134-video.c b/drivers/media/pci/saa7134/saa7134-video.c
index 4b1c432..51d42bb 100644
--- a/drivers/media/pci/saa7134/saa7134-video.c
+++ b/drivers/media/pci/saa7134/saa7134-video.c
@@ -2145,9 +2145,8 @@ int saa7134_video_init1(struct saa7134_dev *dev)
 	dev->automute       = 0;
 
 	INIT_LIST_HEAD(&dev->video_q.queue);
-	init_timer(&dev->video_q.timeout);
-	dev->video_q.timeout.function = saa7134_buffer_timeout;
-	dev->video_q.timeout.data     = (unsigned long)(&dev->video_q);
+	setup_timer(&dev->video_q.timeout, saa7134_buffer_timeout,
+		    (unsigned long)(&dev->video_q));
 	dev->video_q.dev              = dev;
 	dev->fmt = format_by_fourcc(V4L2_PIX_FMT_BGR24);
 	dev->width    = 720;
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2017-04-10  8:34 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-09  1:33 [PATCH 01/12] [media] saa7134: use setup_timer Geliang Tang
2017-04-09  1:33 ` [PATCH 02/12] [media] saa7146: " Geliang Tang
2017-04-09  1:33 ` [PATCH 03/12] [media] bt8xx: " Geliang Tang
2017-04-09  1:34 ` [PATCH 04/12] [media] cx18: " Geliang Tang
2017-04-09  1:34 ` [PATCH 05/12] [media] ivtv: " Geliang Tang
2017-04-09  1:34 ` [PATCH 06/12] [media] netup_unidvb: " Geliang Tang
2017-04-09  1:34 ` [PATCH 07/12] [media] av7110: " Geliang Tang
2017-04-09  1:34 ` [PATCH 08/12] [media] fsl-viu: " Geliang Tang
2017-04-09  1:34 ` [PATCH 09/12] [media] s5p-mfc: " Geliang Tang
     [not found]   ` <CGME20170410083414epcas5p401f39ae110afbae34e0f2c6b53bd86a3@epcas5p4.samsung.com>
2017-04-10  8:33     ` Sylwester Nawrocki
2017-04-09  1:34 ` [PATCH 10/12] [media] c8sectpfe: " Geliang Tang
2017-04-09  1:34 ` [PATCH 11/12] [media] wl128x: " Geliang Tang
2017-04-09  1:34 ` [PATCH 12/12] [media] imon: " Geliang Tang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).