LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Andy Walls <awalls@md.metrocast.net>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
	stoth@kernellabs.com, Mauro Carvalho Chehab <mchehab@redhat.com>
Subject: [PATCH] cx23885: restore flushes of cx23885_dev work items
Date: Tue, 15 Feb 2011 10:20:12 +0100	[thread overview]
Message-ID: <20110215092012.GE3160@htj.dyndns.org> (raw)
In-Reply-To: <1297731276.2394.19.camel@localhost>

Commit 8c71778c (media/video: don't use flush_scheduled_work())
dropped flush_scheduled_work() from cx23885_input_ir_stop()
incorrectly assuming that it didn't use any work item; however,
cx23885_dev makes use of three work items - cx25840_work and
ir_{r|t}x_work.

Make cx23885_input_ir_stop() sync flush all three work items before
returning.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Andy Walls <awalls@md.metrocast.net>
Reviewed-by: Andy Walls <awalls@md.metrocast.net>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/video/cx23885/cx23885-input.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/media/video/cx23885/cx23885-input.c b/drivers/media/video/cx23885/cx23885-input.c
index 199b996..e27cedb 100644
--- a/drivers/media/video/cx23885/cx23885-input.c
+++ b/drivers/media/video/cx23885/cx23885-input.c
@@ -229,6 +229,9 @@ static void cx23885_input_ir_stop(struct cx23885_dev *dev)
 		v4l2_subdev_call(dev->sd_ir, ir, rx_s_parameters, &params);
 		v4l2_subdev_call(dev->sd_ir, ir, rx_g_parameters, &params);
 	}
+	flush_work_sync(&dev->cx25840_work);
+	flush_work_sync(&dev->ir_rx_work);
+	flush_work_sync(&dev->ir_tx_work);
 }
 
 static void cx23885_input_ir_close(struct rc_dev *rc)

  parent reply	other threads:[~2011-02-15  9:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-14  1:35 cx23885-input.c does in fact use a workqueue Andy Walls
2011-02-14  4:33 ` Dmitry Torokhov
2011-02-14 11:03   ` Tejun Heo
2011-02-15  0:54     ` Andy Walls
2011-02-15  9:12       ` Tejun Heo
2011-02-15  9:20       ` Tejun Heo [this message]
2011-02-15 20:00         ` [PATCH] cx23885: restore flushes of cx23885_dev work items Mauro Carvalho Chehab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110215092012.GE3160@htj.dyndns.org \
    --to=tj@kernel.org \
    --cc=awalls@md.metrocast.net \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@redhat.com \
    --cc=stoth@kernellabs.com \
    --subject='Re: [PATCH] cx23885: restore flushes of cx23885_dev work items' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).