Move all of the code doing struct spi_bitbang initialization, so that it can be paired with devm_spi_register_master() in order to avoid having to call spi_bitbang_stop() explicitly.
Showing the changes to include/linux (1 of 2 files). Show all
Unified · Split
| @@ -44,6 +44,7 @@ extern int spi_bitbang_setup_transfer(struct spi_device *spi, · 43 unmodified lines | ||
| 44 | 44 | |
| 45 | 45 | /* start or stop queue processing */ |
| 46 | 46 | extern int spi_bitbang_start(struct spi_bitbang *spi); |
| 47 | +extern int spi_bitbang_init(struct spi_bitbang *spi); | |
| 47 | 48 | extern void spi_bitbang_stop(struct spi_bitbang *spi); |
| 48 | 49 | |
| 49 | 50 | #endif /* __SPI_BITBANG_H */ |