From: Max Filippov Date: Sun, 17 May 2009 23:02:32 +0000 (+0400) Subject: p54spi: cosmetic fixes: use even byte count in SPI write; drop unused interrupt statu... X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=69712e926bad9c163d5ba5597f08084ee7902480;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git 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 Signed-off-by: John W. Linville --- 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, spi_message_add_tail(&t[0], &m); t[1].tx_buf = buf; - t[1].len = len; + t[1].len = len & ~1; spi_message_add_tail(&t[1], &m); if (len % 2) { @@ -541,11 +541,6 @@ static void p54spi_work(struct work_struct *work) } ret = p54spi_wq_tx(priv); - if (ret < 0) - goto out; - - ints = p54spi_read32(priv, SPI_ADRS_HOST_INTERRUPTS); - out: mutex_unlock(&priv->mutex); }