aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2009-05-17 19:02:32 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-05-20 14:46:27 -0400
commit69712e926bad9c163d5ba5597f08084ee7902480 (patch)
tree0b58e4b68cb97d26a0b7b903ce47915bab797c6e /drivers
parent210dd1bb9b0329bcc1b4f8932022eddc6466980c (diff)
p54spi: cosmetic fixes: use even byte count in SPI write; drop unused interrupt status read
When SPI write of odd length is requested, p54spi_write splits it into two parts: one for all data, except the last byte, and one for last byte and padding byte. Unfortunately, the length of first part is not amended. It works because all meaningful bytes have proper value and the last byte of odd length SPI write transaction is ignored. p54spi_work has dummy HOST_INTERRUPTS register read at the end. Drop it, as its result is not used and it has no side effects. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/p54/p54spi.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/net/wireless/p54/p54spi.c b/drivers/net/wireless/p54/p54spi.c
index 272b7e176afc..399190b3bed7 100644
--- a/drivers/net/wireless/p54/p54spi.c
+++ b/drivers/net/wireless/p54/p54spi.c
@@ -96,7 +96,7 @@ static void p54spi_spi_write(struct p54s_priv *priv, u8 address,
96 spi_message_add_tail(&t[0], &m); 96 spi_message_add_tail(&t[0], &m);
97 97
98 t[1].tx_buf = buf; 98 t[1].tx_buf = buf;
99 t[1].len = len; 99 t[1].len = len & ~1;
100 spi_message_add_tail(&t[1], &m); 100 spi_message_add_tail(&t[1], &m);
101 101
102 if (len % 2) { 102 if (len % 2) {
@@ -541,11 +541,6 @@ static void p54spi_work(struct work_struct *work)
541 } 541 }
542 542
543 ret = p54spi_wq_tx(priv); 543 ret = p54spi_wq_tx(priv);
544 if (ret < 0)
545 goto out;
546
547 ints = p54spi_read32(priv, SPI_ADRS_HOST_INTERRUPTS);
548
549out: 544out:
550 mutex_unlock(&priv->mutex); 545 mutex_unlock(&priv->mutex);
551} 546}