diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c index c5f1045561ac..3709088d4d24 100644 --- a/drivers/spi/spidev.c +++ b/drivers/spi/spidev.c @@ -662,6 +662,9 @@ static int spidev_release(struct inode *inode, struct file *filp) if (dofree) kfree(spidev); } +#ifdef CONFIG_SPI_SLAVE + spi_slave_abort(spidev->spi); +#endif mutex_unlock(&device_list_lock); return 0;