From: Mark Brown <broonie@kernel.org>
To: Lukasz Majewski <lukma@denx.de>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
Colin Ian King <colin.king@canonical.com>,
linux-spi <linux-spi@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: spi: Add call to spi_slave_abort() function when spidev driver is released
Date: Mon, 7 Oct 2019 18:02:53 +0100 [thread overview]
Message-ID: <20191007170253.GA5614@sirena.co.uk> (raw)
In-Reply-To: <20190927003849.0c9e4335@jawa>
[-- Attachment #1: Type: text/plain, Size: 529 bytes --]
On Fri, Sep 27, 2019 at 12:38:49AM +0200, Lukasz Majewski wrote:
> Maybe, it would be sufficient for now to move the spi_slave_abort() in
> spi_release() before we decrease (spidev->users--) the use count?
I think that should be OK, or possibly safer to do it at the start of
the if (!spidev->users) section to avoid problems with fork()/exec()
combinations. It'll need an if (spidev->spi) check as well, if we
manage to hit that we've pretty much lost anyway though and I'm not sure
I see a route to sensible error handling.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2019-10-07 17:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-26 10:00 spi: Add call to spi_slave_abort() function when spidev driver is released Colin Ian King
2019-09-26 10:14 ` Lukasz Majewski
2019-09-26 10:15 ` Colin Ian King
2019-09-26 10:32 ` Geert Uytterhoeven
2019-09-26 12:49 ` Lukasz Majewski
2019-09-26 13:51 ` Geert Uytterhoeven
2019-09-26 14:06 ` Lukasz Majewski
2019-09-26 15:17 ` Mark Brown
2019-09-26 22:38 ` Lukasz Majewski
2019-10-07 17:02 ` Mark Brown [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=20191007170253.GA5614@sirena.co.uk \
--to=broonie@kernel.org \
--cc=colin.king@canonical.com \
--cc=geert@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=lukma@denx.de \
/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).