From: "Frank Schäfer" <fschaefer.oss@googlemail.com>
To: Mauro Carvalho Chehab <m.chehab@samsung.com>, unlisted-recipients:;
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>,
Mauro Carvalho Chehab <mchehab@infradead.org>
Subject: Re: [PATCH] [media] em28xx-audio: flush work at .fini
Date: Wed, 15 Jan 2014 22:21:27 +0100 [thread overview]
Message-ID: <52D6FBD7.4080005@googlemail.com> (raw)
In-Reply-To: <1389717879-24939-1-git-send-email-m.chehab@samsung.com>
Am 14.01.2014 17:44, schrieb Mauro Carvalho Chehab:
> As a pending action might be still there at the work
> thread, flush it.
>
> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
> ---
> drivers/media/usb/em28xx/em28xx-audio.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/media/usb/em28xx/em28xx-audio.c b/drivers/media/usb/em28xx/em28xx-audio.c
> index 74575e0ed41b..1563f71a5ea2 100644
> --- a/drivers/media/usb/em28xx/em28xx-audio.c
> +++ b/drivers/media/usb/em28xx/em28xx-audio.c
> @@ -967,6 +967,8 @@ static int em28xx_audio_fini(struct em28xx *dev)
> em28xx_info("Closing audio extension");
>
> snd_card_disconnect(dev->adev.sndcard);
> + flush_work(&dev->wq_trigger);
> +
> em28xx_audio_free_urb(dev);
>
> if (dev->adev.sndcard) {
audio_trigger() doesn't re-schedule the work and flush_work() waits
until the current work is finished.
No, wait ! You are calling flush_work here for synchronization, right ?
That makes sense, but you should update the patch description. ;)
prev parent reply other threads:[~2014-01-15 21:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-14 16:44 [PATCH] [media] em28xx-audio: flush work at .fini Mauro Carvalho Chehab
2014-01-15 21:21 ` Frank Schäfer [this message]
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=52D6FBD7.4080005@googlemail.com \
--to=fschaefer.oss@googlemail.com \
--cc=linux-media@vger.kernel.org \
--cc=m.chehab@samsung.com \
--cc=mchehab@infradead.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.