linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Sven Van Asbroeck <thesven73@gmail.com>
Cc: linux-input@vger.kernel.org,
	Danilo Krummrich <danilokrummrich@dk-develop.de>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Input: ps2-gpio - flush TX work when closing port
Date: Thu, 7 Feb 2019 23:31:02 -0800	[thread overview]
Message-ID: <20190208073102.GA31622@dtor-ws> (raw)
In-Reply-To: <CAGngYiWzC92Lw+Z-BAtPfEHgys0vcQOxdxo7g_JHKHF36-Hm7Q@mail.gmail.com>

On Thu, Feb 07, 2019 at 06:03:03PM -0500, Sven Van Asbroeck wrote:
> On Thu, Feb 7, 2019 at 5:27 PM Dmitry Torokhov
> <dmitry.torokhov@gmail.com> wrote:
> >
> > +       flush_work(&drvdata->tx_work.work);
> 
> Would cancel_work_sync() be better than flush_work() ?

No, because we want to have interrupt and gpios in a consistent state.
If we cancel then we need to see if we should disable it or it may
already be disabled, etc. This way we know it is enabled after
flush_delayed_work() returns, and we need to disable it.

Thanks.

-- 
Dmitry

  reply	other threads:[~2019-02-08  7:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-07 22:27 [PATCH] Input: ps2-gpio - flush TX work when closing port Dmitry Torokhov
2019-02-07 22:31 ` Dmitry Torokhov
2019-02-07 23:03 ` Sven Van Asbroeck
2019-02-08  7:31   ` Dmitry Torokhov [this message]
2019-02-08 15:51     ` Danilo Krummrich
2019-02-08 16:21       ` Sven Van Asbroeck

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=20190208073102.GA31622@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=danilokrummrich@dk-develop.de \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thesven73@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).