1. 04 Sep, 2019 1 commit
  2. 19 Jun, 2019 1 commit
  3. 16 Aug, 2017 2 commits
  4. 20 Oct, 2014 1 commit
  5. 21 Mar, 2014 1 commit
  6. 13 Mar, 2014 1 commit
  7. 03 Feb, 2014 1 commit
  8. 13 Jan, 2014 1 commit
  9. 07 Oct, 2013 1 commit
    • Axel Lin's avatar
      spi: bitbang: Let spi_bitbang_start() take a reference to master · 702a4879
      Axel Lin authored
      
      
      Many drivers that use bitbang library have a leak on probe error paths.
      This is because once a spi_master_get() call succeeds, we need an additional
      spi_master_put() call to free the memory.
      
      Fix this issue by moving the code taking a reference to master to
      spi_bitbang_start(), so spi_bitbang_start() will take a reference to master on
      success. With this change, the caller is responsible for calling
      spi_bitbang_stop() to decrement the reference and spi_master_put() as
      counterpart of spi_alloc_master() to prevent a memory leak.
      
      So now we have below patten for drivers using bitbang library:
      
      probe:
      spi_alloc_master        -> Init reference count to 1
      spi_bitbang_start       -> Increment reference count
      remove:
      spi_bitbang_stop        -> Decrement reference count
      spi_master_put          -> Decrement reference count (reference count reaches 0)
      
      Fixup all users accordingly.
      Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
      Suggested-by: default avatarUwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
      Acked-by: default avatarUwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
      Signed-off-by: default avatarMark Brown <broonie@linaro.org>
      702a4879
  10. 17 Sep, 2013 1 commit
    • Axel Lin's avatar
      spi: bitbang: Let spi_bitbang_start() take a reference to master · 94c69f76
      Axel Lin authored
      
      
      Many drivers that use bitbang library have a leak on probe error paths.
      This is because once a spi_master_get() call succeeds, we need an additional
      spi_master_put() call to free the memory.
      
      Fix this issue by moving the code taking a reference to master to
      spi_bitbang_start(), so spi_bitbang_start() will take a reference to master on
      success. With this change, the caller is responsible for calling
      spi_bitbang_stop() to decrement the reference and spi_master_put() as
      counterpart of spi_alloc_master() to prevent a memory leak.
      
      So now we have below patten for drivers using bitbang library:
      
      probe:
      spi_alloc_master        -> Init reference count to 1
      spi_bitbang_start       -> Increment reference count
      remove:
      spi_bitbang_stop        -> Decrement reference count
      spi_master_put          -> Decrement reference count (reference count reaches 0)
      
      Fixup all users accordingly.
      Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
      Suggested-by: default avatarUwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
      Acked-by: default avatarUwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
      Signed-off-by: default avatarMark Brown <broonie@linaro.org>
      94c69f76
  11. 31 Aug, 2013 1 commit
  12. 29 Aug, 2013 3 commits
  13. 28 Aug, 2013 1 commit
  14. 09 Aug, 2013 1 commit
  15. 11 Jul, 2013 1 commit
    • Stephen Warren's avatar
      spi: revert master->setup function removal for altera and nuc900 · 103ccee4
      Stephen Warren authored
      Commit 24778be2
      
       "spi: convert drivers to use bits_per_word_mask" removed
      what appeared to be redundant code from many drivers. However, it
      appears that in the spi-bitbang case, these functions are required by
      the spi-bitbang core, even if they don't do anything. Restore them.
      
      For 3.12, the spi-bitbang core should be adjusted not to require these
      callbacks to exist if they don't need to do anything.
      
      This is the equivalent of Michal Simek's patch "spi/xilinx: Revert
      master->setup function removal", applied to other affected drivers.
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      Signed-off-by: default avatarMark Brown <broonie@linaro.org>
      103ccee4
  16. 29 May, 2013 1 commit
  17. 13 May, 2013 1 commit
  18. 05 Feb, 2013 1 commit
  19. 07 Dec, 2012 1 commit
  20. 17 Aug, 2012 1 commit
  21. 31 Oct, 2011 1 commit
  22. 24 Oct, 2011 1 commit
  23. 06 Jun, 2011 1 commit
  24. 22 Feb, 2011 1 commit