wifi: wilc1000: remove setting msg.spi
Calling spi_sync() unconditionally sets the spi field of struct spi_message. Therefore setting msg.spi = spi before calling spi_sync() has no effect and can be removed. (spi_message_add_tail() does not access this field.) Signed-off-by: David Lechner <dlechner@baylibre.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20240201201248.2334798-2-dlechner@baylibre.com
This commit is contained in:
committed by
Kalle Valo
parent
2719a9e715
commit
bed41a3444
@@ -300,7 +300,6 @@ static int wilc_spi_tx(struct wilc *wilc, u8 *b, u32 len)
|
||||
|
||||
memset(&msg, 0, sizeof(msg));
|
||||
spi_message_init(&msg);
|
||||
msg.spi = spi;
|
||||
spi_message_add_tail(&tr, &msg);
|
||||
|
||||
ret = spi_sync(spi, &msg);
|
||||
@@ -343,7 +342,6 @@ static int wilc_spi_rx(struct wilc *wilc, u8 *rb, u32 rlen)
|
||||
|
||||
memset(&msg, 0, sizeof(msg));
|
||||
spi_message_init(&msg);
|
||||
msg.spi = spi;
|
||||
spi_message_add_tail(&tr, &msg);
|
||||
|
||||
ret = spi_sync(spi, &msg);
|
||||
@@ -381,8 +379,6 @@ static int wilc_spi_tx_rx(struct wilc *wilc, u8 *wb, u8 *rb, u32 rlen)
|
||||
|
||||
memset(&msg, 0, sizeof(msg));
|
||||
spi_message_init(&msg);
|
||||
msg.spi = spi;
|
||||
|
||||
spi_message_add_tail(&tr, &msg);
|
||||
ret = spi_sync(spi, &msg);
|
||||
if (ret < 0)
|
||||
|
||||
Reference in New Issue
Block a user