[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190603155714.GY2456@sirena.org.uk>
Date: Mon, 3 Jun 2019 16:57:14 +0100
From: Mark Brown <broonie@...nel.org>
To: Vivek Pernamitta <pervivek@...il.com>
Cc: linux-spi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] spi: spidev: Fix for reverting spi max speed value only
on failure
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.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists