summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-bitbang.c
diff options
context:
space:
mode:
authorHeiner Kallweit <hkallweit1@gmail.com>2015-09-29 23:09:33 +0200
committerMark Brown <broonie@kernel.org>2015-10-05 14:55:55 +0100
commite30d8f23926b70a003d9fb16b49bfe23f01269da (patch)
treedc39679b953e26620bde3bae515af489605ed621 /drivers/spi/spi-bitbang.c
parentc15f6ed3a18f10cdc33f64906ab353f17a6df114 (diff)
spi: bitbang: remove unneeded check
Remove an unneeded check. The SPI core (__spi_validate) takes care that these fields are always populated. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-bitbang.c')
-rw-r--r--drivers/spi/spi-bitbang.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/drivers/spi/spi-bitbang.c b/drivers/spi/spi-bitbang.c
index ef43ef507c9a..ad3168dc45e7 100644
--- a/drivers/spi/spi-bitbang.c
+++ b/drivers/spi/spi-bitbang.c
@@ -272,7 +272,6 @@ static int spi_bitbang_transfer_one(struct spi_master *master,
struct spi_transfer *t = NULL;
unsigned cs_change;
int status;
- int do_setup = -1;
struct spi_device *spi = m->spi;
bitbang = spi_master_get_devdata(master);
@@ -288,19 +287,10 @@ static int spi_bitbang_transfer_one(struct spi_master *master,
list_for_each_entry(t, &m->transfers, transfer_list) {
- /* override speed or wordsize? */
- if (t->speed_hz || t->bits_per_word)
- do_setup = 1;
-
- /* init (-1) or override (1) transfer params */
- if (do_setup != 0) {
- if (bitbang->setup_transfer) {
- status = bitbang->setup_transfer(spi, t);
- if (status < 0)
- break;
- }
- if (do_setup == -1)
- do_setup = 0;
+ if (bitbang->setup_transfer) {
+ status = bitbang->setup_transfer(spi, t);
+ if (status < 0)
+ break;
}
/* set up default clock polarity, and activate chip;