From 8c71778cbf2c8beaefaa2dee5478aa0622d96682 Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Fri, 24 Dec 2010 16:14:20 +0100 Subject: media/video: don't use flush_scheduled_work() This patch converts the remaining users of flush_scheduled_work() in media/video. * bttv-input.c and cx23885-input.c don't use workqueue at all. No need to flush. * Make omap24xxcam.c and saa7134-empress.c flush the used work directly. * In fd_defio.c, replace cancel_delayed_work() + flush_scheduled_work() with cancel_delayed_work_sync(). While at it, replace the deprecated cancel_rearming_delayed_work() with cancel_delayed_work_sync(). Signed-off-by: Tejun Heo Cc: Mauro Carvalho Chehab --- drivers/media/video/omap24xxcam.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/media/video/omap24xxcam.c') diff --git a/drivers/media/video/omap24xxcam.c b/drivers/media/video/omap24xxcam.c index 378b094aff16..017552762902 100644 --- a/drivers/media/video/omap24xxcam.c +++ b/drivers/media/video/omap24xxcam.c @@ -1198,7 +1198,7 @@ static int vidioc_streamoff(struct file *file, void *fh, enum v4l2_buf_type i) atomic_inc(&cam->reset_disable); - flush_scheduled_work(); + flush_work_sync(&cam->sensor_reset_work); rval = videobuf_streamoff(q); if (!rval) { @@ -1512,7 +1512,7 @@ static int omap24xxcam_release(struct file *file) atomic_inc(&cam->reset_disable); - flush_scheduled_work(); + flush_work_sync(&cam->sensor_reset_work); /* stop streaming capture */ videobuf_streamoff(&fh->vbq); @@ -1536,7 +1536,7 @@ static int omap24xxcam_release(struct file *file) * not be scheduled anymore since streaming is already * disabled.) */ - flush_scheduled_work(); + flush_work_sync(&cam->sensor_reset_work); mutex_lock(&cam->mutex); if (atomic_dec_return(&cam->users) == 0) { -- cgit v1.2.3