aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/gspca/finepix.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/usb/gspca/finepix.c')
-rw-r--r--drivers/media/usb/gspca/finepix.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/media/usb/gspca/finepix.c b/drivers/media/usb/gspca/finepix.c
index 52bdb569760b..ae9a55d7bbbb 100644
--- a/drivers/media/usb/gspca/finepix.c
+++ b/drivers/media/usb/gspca/finepix.c
@@ -41,7 +41,6 @@ struct usb_fpix {
struct gspca_dev gspca_dev; /* !! must be the first item */
struct work_struct work_struct;
- struct workqueue_struct *work_thread;
};
/* Delay after which claim the next frame. If the delay is too small,
@@ -226,9 +225,7 @@ static int sd_start(struct gspca_dev *gspca_dev)
/* Again, reset bulk in endpoint */
usb_clear_halt(gspca_dev->dev, gspca_dev->urb[0]->pipe);
- /* Start the workqueue function to do the streaming */
- dev->work_thread = create_singlethread_workqueue(MODULE_NAME);
- queue_work(dev->work_thread, &dev->work_struct);
+ schedule_work(&dev->work_struct);
return 0;
}
@@ -241,9 +238,8 @@ static void sd_stop0(struct gspca_dev *gspca_dev)
/* wait for the work queue to terminate */
mutex_unlock(&gspca_dev->usb_lock);
- destroy_workqueue(dev->work_thread);
+ flush_work(&dev->work_struct);
mutex_lock(&gspca_dev->usb_lock);
- dev->work_thread = NULL;
}
/* Table of supported USB devices */