summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/s5p-mfc
diff options
context:
space:
mode:
authorBhaktipriya Shridhar2016-07-16 10:30:25 +0200
committerMauro Carvalho Chehab2016-08-24 18:37:18 +0200
commited90013e40af2bb703ecaed39dc2422c70006a34 (patch)
treec1fd2a77836fc44a7e9a4dbbd98505be449a1335 /drivers/media/platform/s5p-mfc
parent[media] media: s5p-jpeg add missing blank lines after declarations (diff)
downloadkernel-qcow2-linux-ed90013e40af2bb703ecaed39dc2422c70006a34.tar.gz
kernel-qcow2-linux-ed90013e40af2bb703ecaed39dc2422c70006a34.tar.xz
kernel-qcow2-linux-ed90013e40af2bb703ecaed39dc2422c70006a34.zip
[media] s5p-mfc: Remove deprecated create_singlethread_workqueue
alloc_workqueue replaces deprecated create_singlethread_workqueue(). The MFC device driver is a v4l2 driver which can encode/decode video raw/elementary streams and has support for all popular video codecs. The driver's watchdog_workqueue has been replaced with system_wq since it queues a single work item, &dev->watchdog_work, which calls for no ordering requirement. The work item is involved in running the watchdog timer and is not being used on a memory reclaim path. Work item has been flushed in s5p_mfc_remove() to ensure that there are no pending tasks while disconnecting the driver. Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/platform/s5p-mfc')
-rw-r--r--drivers/media/platform/s5p-mfc/s5p_mfc.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c
index ffb9c53fca2c..0a5b8f5e011e 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c
@@ -153,7 +153,7 @@ static void s5p_mfc_watchdog(unsigned long arg)
* error. Now it is time to kill all instances and
* reset the MFC. */
mfc_err("Time out during waiting for HW\n");
- queue_work(dev->watchdog_workqueue, &dev->watchdog_work);
+ schedule_work(&dev->watchdog_work);
}
dev->watchdog_timer.expires = jiffies +
msecs_to_jiffies(MFC_WATCHDOG_INTERVAL);
@@ -1246,7 +1246,6 @@ static int s5p_mfc_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, dev);
dev->hw_lock = 0;
- dev->watchdog_workqueue = create_singlethread_workqueue(S5P_MFC_NAME);
INIT_WORK(&dev->watchdog_work, s5p_mfc_watchdog_worker);
atomic_set(&dev->watchdog_cnt, 0);
init_timer(&dev->watchdog_timer);
@@ -1324,8 +1323,7 @@ static int s5p_mfc_remove(struct platform_device *pdev)
mutex_unlock(&dev->mfc_mutex);
del_timer_sync(&dev->watchdog_timer);
- flush_workqueue(dev->watchdog_workqueue);
- destroy_workqueue(dev->watchdog_workqueue);
+ flush_work(&dev->watchdog_work);
video_unregister_device(dev->vfd_enc);
video_unregister_device(dev->vfd_dec);