cx23885: restore flushes of cx23885_dev work items
Commit Message
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(+)
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Comments
Em 15-02-2011 07:20, Tejun Heo escreveu:
> 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>
Acked-by: 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, ¶ms);
> v4l2_subdev_call(dev->sd_ir, ir, rx_g_parameters, ¶ms);
> }
> + 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)
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
@@ -229,6 +229,9 @@ static void cx23885_input_ir_stop(struct cx23885_dev *dev)
v4l2_subdev_call(dev->sd_ir, ir, rx_s_parameters, ¶ms);
v4l2_subdev_call(dev->sd_ir, ir, rx_g_parameters, ¶ms);
}
+ 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)