460-spi-bitbang-export-spi_bitbang_bufs.patch 1.0 KB

12345678910111213141516171819202122232425262728
  1. --- a/drivers/spi/spi-bitbang.c
  2. +++ b/drivers/spi/spi-bitbang.c
  3. @@ -231,13 +231,14 @@ void spi_bitbang_cleanup(struct spi_devi
  4. }
  5. EXPORT_SYMBOL_GPL(spi_bitbang_cleanup);
  6. -static int spi_bitbang_bufs(struct spi_device *spi, struct spi_transfer *t)
  7. +int spi_bitbang_bufs(struct spi_device *spi, struct spi_transfer *t)
  8. {
  9. struct spi_bitbang_cs *cs = spi->controller_state;
  10. unsigned nsecs = cs->nsecs;
  11. return cs->txrx_bufs(spi, cs->txrx_word, nsecs, t);
  12. }
  13. +EXPORT_SYMBOL_GPL(spi_bitbang_bufs);
  14. /*----------------------------------------------------------------------*/
  15. --- a/include/linux/spi/spi_bitbang.h
  16. +++ b/include/linux/spi/spi_bitbang.h
  17. @@ -39,6 +39,7 @@ extern int spi_bitbang_setup(struct spi_
  18. extern void spi_bitbang_cleanup(struct spi_device *spi);
  19. extern int spi_bitbang_setup_transfer(struct spi_device *spi,
  20. struct spi_transfer *t);
  21. +extern int spi_bitbang_bufs(struct spi_device *spi, struct spi_transfer *t);
  22. /* start or stop queue processing */
  23. extern int spi_bitbang_start(struct spi_bitbang *spi);