aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi_bitbang.c
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2006-04-02 17:06:35 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-05-16 17:33:57 -0400
commitff9f4771b5f017ee0f57629488b6cd7a6ef3d19b (patch)
tree2d487a384f075f82444135a77330755f1755aa16 /drivers/spi/spi_bitbang.c
parent025c398710ac24456f0288fc7e64f426c5c5508f (diff)
[PATCH] SPI: Renamed bitbang_transfer_setup to spi_bitbang_setup_transfer and export it
Renamed bitbang_transfer_setup to follow convention of other exported symbols from spi-bitbang. Exported spi_bitbang_setup_transfer to allow users of spi-bitbang to use the function in their own setup_transfer. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Cc: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/spi/spi_bitbang.c')
-rw-r--r--drivers/spi/spi_bitbang.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/spi/spi_bitbang.c b/drivers/spi/spi_bitbang.c
index 0525c99118c3..6c3da64d609a 100644
--- a/drivers/spi/spi_bitbang.c
+++ b/drivers/spi/spi_bitbang.c
@@ -138,8 +138,7 @@ static unsigned bitbang_txrx_32(
138 return t->len - count; 138 return t->len - count;
139} 139}
140 140
141static int 141int spi_bitbang_setup_transfer(struct spi_device *spi, struct spi_transfer *t)
142bitbang_transfer_setup(struct spi_device *spi, struct spi_transfer *t)
143{ 142{
144 struct spi_bitbang_cs *cs = spi->controller_state; 143 struct spi_bitbang_cs *cs = spi->controller_state;
145 u8 bits_per_word; 144 u8 bits_per_word;
@@ -174,6 +173,7 @@ bitbang_transfer_setup(struct spi_device *spi, struct spi_transfer *t)
174 173
175 return 0; 174 return 0;
176} 175}
176EXPORT_SYMBOL_GPL(spi_bitbang_setup_transfer);
177 177
178/** 178/**
179 * spi_bitbang_setup - default setup for per-word I/O loops 179 * spi_bitbang_setup - default setup for per-word I/O loops
@@ -203,7 +203,7 @@ int spi_bitbang_setup(struct spi_device *spi)
203 if (!cs->txrx_word) 203 if (!cs->txrx_word)
204 return -EINVAL; 204 return -EINVAL;
205 205
206 retval = bitbang_transfer_setup(spi, NULL); 206 retval = spi_bitbang_setup_transfer(spi, NULL);
207 if (retval < 0) 207 if (retval < 0)
208 return retval; 208 return retval;
209 209
@@ -454,7 +454,9 @@ int spi_bitbang_start(struct spi_bitbang *bitbang)
454 bitbang->use_dma = 0; 454 bitbang->use_dma = 0;
455 bitbang->txrx_bufs = spi_bitbang_bufs; 455 bitbang->txrx_bufs = spi_bitbang_bufs;
456 if (!bitbang->master->setup) { 456 if (!bitbang->master->setup) {
457 bitbang->setup_transfer = bitbang_transfer_setup; 457 if (!bitbang->setup_transfer)
458 bitbang->setup_transfer =
459 spi_bitbang_setup_transfer;
458 bitbang->master->setup = spi_bitbang_setup; 460 bitbang->master->setup = spi_bitbang_setup;
459 bitbang->master->cleanup = spi_bitbang_cleanup; 461 bitbang->master->cleanup = spi_bitbang_cleanup;
460 } 462 }