spi: Fix use-after-free with devm_spi_alloc_*
[sfrench/cifs-2.6.git] / include / linux / spi / spi.h
index 592897fa4f030ed08c07c95ea6af56abfbd4739a..643139b1eafea74fa46fa11962b20b870973dd55 100644 (file)
@@ -510,6 +510,9 @@ struct spi_controller {
 
 #define SPI_MASTER_GPIO_SS             BIT(5)  /* GPIO CS must select slave */
 
+       /* flag indicating this is a non-devres managed controller */
+       bool                    devm_allocated;
+
        /* flag indicating this is an SPI slave controller */
        bool                    slave;