0009-spi-export-spi_bitbang_bufs-function.patch 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. From ff81dc67568d5393c30352c6075b43afc9de2329 Mon Sep 17 00:00:00 2001
  2. From: Phil Sutter <phil@nwl.cc>
  3. Date: Tue, 13 May 2014 00:22:55 +0200
  4. Subject: [PATCH] spi: export spi_bitbang_bufs function
  5. ---
  6. drivers/spi/spi-bitbang.c | 3 ++-
  7. include/linux/spi/spi_bitbang.h | 1 +
  8. 2 files changed, 3 insertions(+), 1 deletion(-)
  9. diff --git a/drivers/spi/spi-bitbang.c b/drivers/spi/spi-bitbang.c
  10. index bd222f6..2145d77 100644
  11. --- a/drivers/spi/spi-bitbang.c
  12. +++ b/drivers/spi/spi-bitbang.c
  13. @@ -234,13 +234,14 @@ void spi_bitbang_cleanup(struct spi_device *spi)
  14. }
  15. EXPORT_SYMBOL_GPL(spi_bitbang_cleanup);
  16. -static int spi_bitbang_bufs(struct spi_device *spi, struct spi_transfer *t)
  17. +int spi_bitbang_bufs(struct spi_device *spi, struct spi_transfer *t)
  18. {
  19. struct spi_bitbang_cs *cs = spi->controller_state;
  20. unsigned nsecs = cs->nsecs;
  21. return cs->txrx_bufs(spi, cs->txrx_word, nsecs, t);
  22. }
  23. +EXPORT_SYMBOL_GPL(spi_bitbang_bufs);
  24. /*----------------------------------------------------------------------*/
  25. diff --git a/include/linux/spi/spi_bitbang.h b/include/linux/spi/spi_bitbang.h
  26. index daebaba..1631d7a 100644
  27. --- a/include/linux/spi/spi_bitbang.h
  28. +++ b/include/linux/spi/spi_bitbang.h
  29. @@ -39,6 +39,7 @@ extern int spi_bitbang_setup(struct spi_device *spi);
  30. extern void spi_bitbang_cleanup(struct spi_device *spi);
  31. extern int spi_bitbang_setup_transfer(struct spi_device *spi,
  32. struct spi_transfer *t);
  33. +extern int spi_bitbang_bufs(struct spi_device *spi, struct spi_transfer *t);
  34. /* start or stop queue processing */
  35. extern int spi_bitbang_start(struct spi_bitbang *spi);
  36. --
  37. 1.8.5.3