lkml.org 
[lkml]   [2020]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectApplied "spi: spidev: fix speed setting message" to the spi tree
    The patch

    spi: spidev: fix speed setting message

    has been applied to the spi tree at

    https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git

    All being well this means that it will be integrated into the linux-next
    tree (usually sometime in the next 24 hours) and sent to Linus during
    the next merge window (or sooner if it is a bug fix), however if
    problems are discovered then the patch may be dropped or reverted.

    You may get further e-mails resulting from automated or manual testing
    and review of the tree, please engage with people reporting problems and
    send followup patches addressing any issues that are reported if needed.

    If any updates are required or you are submitting further changes they
    should be sent as incremental updates against current git, existing
    patches will not be replaced.

    Please add any relevant lists and maintainers to the CCs when replying
    to this mail.

    Thanks,
    Mark

    From 4276fc82fc5d1aa24c6ad1a16fbaccf11fa61e02 Mon Sep 17 00:00:00 2001
    From: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
    Date: Sat, 29 Feb 2020 18:18:41 +0200
    Subject: [PATCH] spi: spidev: fix speed setting message

    The message of max device speed setting is shown when
    an error in spi_setup() occurs.
    Instead, it should be shown when the setup call succeeds.

    Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
    Link: https://lore.kernel.org/r/20200229161841.89144-3-oleksandr.suvorov@toradex.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
    ---
    drivers/spi/spidev.c | 7 ++++---
    1 file changed, 4 insertions(+), 3 deletions(-)

    diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c
    index c97e853dbf5c..80dd1025b953 100644
    --- a/drivers/spi/spidev.c
    +++ b/drivers/spi/spidev.c
    @@ -454,10 +454,11 @@ spidev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)

    spi->max_speed_hz = tmp;
    retval = spi_setup(spi);
    - if (retval >= 0)
    + if (retval == 0) {
    spidev->speed_hz = tmp;
    - else
    - dev_dbg(&spi->dev, "%d Hz (max)\n", tmp);
    + dev_dbg(&spi->dev, "%d Hz (max)\n",
    + spidev->speed_hz);
    + }
    spi->max_speed_hz = save;
    }
    break;
    --
    2.20.1
    \
     
     \ /
      Last update: 2020-03-02 17:05    [W:7.187 / U:0.208 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site