spi: bitbang: Introduce spi_bitbang_init()

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.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Chris Healy <cphealy@gmail.com>
Cc: linux-spi@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Andrey Smirnov 2019-04-02 21:01:32 -07:00 • committed by Mark Brown
commit 45beec3519
No known key found for this signature in database
GPG key ID: 24D68B725D5487D0
2 changed files with 40 additions and 27 deletions