Message ID | 20190925091143.15468-2-lukma@denx.de (mailing list archive) |
---|---|
State | Accepted |
Commit | 9f918a728cf86b2757b6a7025e1f46824bfe3155 |
Headers | show |
Series | spi: Fix problem with interrupted slave transmission | expand |
On Wed, Sep 25, 2019 at 11:11:42AM +0200, Lukasz Majewski wrote: > This change is necessary for spidev devices (e.g. /dev/spidev3.0) working > in the slave mode (like NXP's dspi driver for Vybrid SoC). Please do not submit new versions of already applied patches, please submit incremental updates to the existing code. Modifying existing commits creates problems for other users building on top of those commits so it's best practice to only change pubished git commits if absolutely essential. That said I'll handle this this one time.
Hi Mark, > On Wed, Sep 25, 2019 at 11:11:42AM +0200, Lukasz Majewski wrote: > > This change is necessary for spidev devices (e.g. /dev/spidev3.0) > > working in the slave mode (like NXP's dspi driver for Vybrid SoC). > > Please do not submit new versions of already applied patches, please > submit incremental updates to the existing code. Modifying existing > commits creates problems for other users building on top of those > commits so it's best practice to only change pubished git commits if > absolutely essential. > > That said I'll handle this this one time. Thanks for help (and patience). Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c index 255786f2e844..3ea9d8a3e6e8 100644 --- a/drivers/spi/spidev.c +++ b/drivers/spi/spidev.c @@ -627,6 +627,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;