All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
To: Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
	Geunyoung Kim <nenggun.kim@samsung.com>,
	Junghak Sung <jh1009.sung@samsung.com>,
	Hans Verkuil <hans.verkuil@cisco.com>,
	Inki Dae <inki.dae@samsung.com>
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	Tejun Heo <tj@kernel.org>
Subject: [PATCH v2 1/2] [media] cx25821: Drop Freeing of Workqueue
Date: Mon, 25 Jul 2016 20:25:22 +0530	[thread overview]
Message-ID: <8c263ffbbc4cfc9ef95ba0ba6f5dbebf253784c2.1469458280.git.bhaktipriya96@gmail.com> (raw)
In-Reply-To: <20160725144952.GA11594@Karyakshetra>

Workqueues shouldn't be freed. destroy_workqueue should be used instead.
destroy_workqueue safely destroys a workqueue and ensures that all pending
work items are done before destroying the workqueue.

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
---
 Changes in v2: None

 drivers/media/pci/cx25821/cx25821-audio-upstream.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/pci/cx25821/cx25821-audio-upstream.c b/drivers/media/pci/cx25821/cx25821-audio-upstream.c
index 68dbc2d..05bd957 100644
--- a/drivers/media/pci/cx25821/cx25821-audio-upstream.c
+++ b/drivers/media/pci/cx25821/cx25821-audio-upstream.c
@@ -242,7 +242,7 @@ void cx25821_stop_upstream_audio(struct cx25821_dev *dev)
 	dev->_audioframe_count = 0;
 	dev->_audiofile_status = END_OF_FILE;

-	kfree(dev->_irq_audio_queues);
+	destroy_workqueue(dev->_irq_audio_queues);
 	dev->_irq_audio_queues = NULL;

 	kfree(dev->_audiofilename);
--
2.1.4

  reply	other threads:[~2016-07-25 14:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-25 14:49 [PATCH v2 0/2] Remove improper workqueue usage Bhaktipriya Shridhar
2016-07-25 14:55 ` Bhaktipriya Shridhar [this message]
2016-07-25 19:08   ` [PATCH v2 1/2] [media] cx25821: Drop Freeing of Workqueue Tejun Heo
2016-07-25 15:05 ` [PATCH v2 2/2] [media] cx25821: Remove deprecated create_singlethread_workqueue Bhaktipriya Shridhar

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=8c263ffbbc4cfc9ef95ba0ba6f5dbebf253784c2.1469458280.git.bhaktipriya96@gmail.com \
    --to=bhaktipriya96@gmail.com \
    --cc=hans.verkuil@cisco.com \
    --cc=inki.dae@samsung.com \
    --cc=jh1009.sung@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@osg.samsung.com \
    --cc=nenggun.kim@samsung.com \
    --cc=tj@kernel.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.