From: Mark Brown <broonie@kernel.org>
To: Vivek Pernamitta <pervivek@gmail.com>
Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] spi: spidev: Fix for reverting spi max speed value only on failure
Date: Mon, 3 Jun 2019 16:57:14 +0100 [thread overview]
Message-ID: <20190603155714.GY2456@sirena.org.uk> (raw)
In-Reply-To: <20190602141959.5616-1-pervivek@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 706 bytes --]
On Sun, Jun 02, 2019 at 07:49:59PM +0530, Vivek Pernamitta wrote:
> When user space application request for change in spi clock
> using ioctl, current value is taken back-up and new value is
> assigned to spi->max_speed_hz, then spi_setup() function is
> called with new value. If spi_setup() function fails, it needs
> reverting to old spi_max_speed value only in failure condition.
The current behaviour is intentional, we're not modifying max_speed_hz
so we can continue to enforce the kernel limit no matter what userspace
asked for - actually looking at the code we should probably have an
explicit error check in there to reject attempts to raise it here, not
sure why we're not doing that already.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2019-06-03 15:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-02 14:19 Vivek Pernamitta
2019-06-03 15:57 ` 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=20190603155714.GY2456@sirena.org.uk \
--to=broonie@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=pervivek@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
all inboxes | Powered by JetHome®