]> Git Repo - linux.git/commitdiff
Merge tag 'spi-fix-v5.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi
authorLinus Torvalds <[email protected]>
Mon, 10 Jun 2019 17:19:56 +0000 (07:19 -1000)
committerLinus Torvalds <[email protected]>
Mon, 10 Jun 2019 17:19:56 +0000 (07:19 -1000)
Pull spi fixes from Mark Brown:
 "A small set of fixes here.

  One core fix for error handling when we fail to set up the hardware
  before initiating a transfer and another one reverting a change in the
  core which broke Raspberry Pi in common use cases as part of some
  optimization work.

  There's also a couple of driver specific fixes"

* tag 'spi-fix-v5.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
  spi: abort spi_sync if failed to prepare_transfer_hardware
  spi: spi-fsl-spi: call spi_finalize_current_message() at the end
  spi: bitbang: Fix NULL pointer dereference in spi_unregister_master
  spi: Fix Raspberry Pi breakage

1  2 
drivers/spi/spi-bitbang.c
drivers/spi/spi-fsl-spi.c

index dad566bfe372171747960519dafaaf04f8ae891e,e8fd9527631599b3ebd91e2d809b859cb0ce308d..d84e22dd6f9f7d79384ae55617efbd75e84018e5
@@@ -1,6 -1,15 +1,6 @@@
 +// SPDX-License-Identifier: GPL-2.0-or-later
  /*
   * polling/bitbanging SPI master controller driver utilities
 - *
 - * This program is free software; you can redistribute it and/or modify
 - * it under the terms of the GNU General Public License as published by
 - * the Free Software Foundation; either version 2 of the License, or
 - * (at your option) any later version.
 - *
 - * This program is distributed in the hope that it will be useful,
 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 - * GNU General Public License for more details.
   */
  
  #include <linux/spinlock.h>
@@@ -406,7 -415,7 +406,7 @@@ int spi_bitbang_start(struct spi_bitban
        if (ret)
                spi_master_put(master);
  
-       return 0;
+       return ret;
  }
  EXPORT_SYMBOL_GPL(spi_bitbang_start);
  
index 4c71df93a6f66f72c54c91786ec79f31660b420f,7fbdaf0667197452be42716ad3009450b892055c..1d9b33aa1a3b53f8f4c8ff129afa8f15998c8af7
@@@ -1,4 -1,3 +1,4 @@@
 +// SPDX-License-Identifier: GPL-2.0-or-later
  /*
   * Freescale SPI controller driver.
   *
   * GRLIB support:
   * Copyright (c) 2012 Aeroflex Gaisler AB.
   * Author: Andreas Larsson <[email protected]>
 - *
 - * This program is free software; you can redistribute  it and/or modify it
 - * under  the terms of  the GNU General  Public License as published by the
 - * Free Software Foundation;  either version 2 of the  License, or (at your
 - * option) any later version.
   */
  #include <linux/delay.h>
  #include <linux/dma-mapping.h>
@@@ -428,7 -432,6 +428,6 @@@ static int fsl_spi_do_one_msg(struct sp
        }
  
        m->status = status;
-       spi_finalize_current_message(master);
  
        if (status || !cs_change) {
                ndelay(nsecs);
        }
  
        fsl_spi_setup_transfer(spi, NULL);
+       spi_finalize_current_message(master);
        return 0;
  }
  
This page took 0.064545 seconds and 4 git commands to generate.