Merge branch 'spi-5.15' into spi-5.16
authorMark Brown <broonie@kernel.org>
Thu, 14 Oct 2021 13:15:46 +0000 (14:15 +0100)
committerMark Brown <broonie@kernel.org>
Thu, 14 Oct 2021 13:15:46 +0000 (14:15 +0100)
1  2 
drivers/spi/spi.c
include/linux/spi/spi.h

index 50591de16e0f53331538fcc3c7408c122fc6da84,926b68aa45d3ed2053bbc128a16d5935d8108be8..72826bdab2704ade70b22bde9cbac7a969ece4ae
@@@ -635,11 -626,16 +629,11 @@@ static int spi_add_device(struct spi_de
        /* Set the bus ID string */
        spi_dev_set_name(spi);
  
-       mutex_lock(&spi_add_lock);
 -      /* We need to make sure there's no other device with this
 -       * chipselect **BEFORE** we call setup(), else we'll trash
 -       * its configuration.  Lock against concurrent add() calls.
 -       */
+       mutex_lock(&ctlr->add_lock);
        status = __spi_add_device(spi);
-       mutex_unlock(&spi_add_lock);
+       mutex_unlock(&ctlr->add_lock);
        return status;
  }
 -EXPORT_SYMBOL_GPL(spi_add_device);
  
  static int spi_add_device_locked(struct spi_device *spi)
  {
Simple merge