Skip to content

Commit 099ffd7

Browse files
commododavem330
authored andcommitted
NFC: NCI: use new delay structure for SPI transfer delays
In a recent change to the SPI subsystem [1], a new `delay` struct was added to replace the `delay_usecs`. This change replaces the current `delay_secs` with `delay` for this driver. The `spi_transfer_delay_exec()` function [in the SPI framework] makes sure that both `delay_usecs` & `delay` are used (in this order to preserve backwards compatibility). [1] commit bebcfd2 ("spi: introduce `delay` field for `spi_transfer` + spi_transfer_delay_exec()") Signed-off-by: Alexandru Ardelean <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 38ecd70 commit 099ffd7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

net/nfc/nci/spi.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ static int __nci_spi_send(struct nci_spi *nspi, struct sk_buff *skb,
4444
t.len = 0;
4545
}
4646
t.cs_change = cs_change;
47-
t.delay_usecs = nspi->xfer_udelay;
47+
t.delay.value = nspi->xfer_udelay;
48+
t.delay.unit = SPI_DELAY_UNIT_USECS;
4849
t.speed_hz = nspi->xfer_speed_hz;
4950

5051
spi_message_init(&m);
@@ -216,7 +217,8 @@ static struct sk_buff *__nci_spi_read(struct nci_spi *nspi)
216217
rx.rx_buf = skb_put(skb, rx_len);
217218
rx.len = rx_len;
218219
rx.cs_change = 0;
219-
rx.delay_usecs = nspi->xfer_udelay;
220+
rx.delay.value = nspi->xfer_udelay;
221+
rx.delay.unit = SPI_DELAY_UNIT_USECS;
220222
rx.speed_hz = nspi->xfer_speed_hz;
221223
spi_message_add_tail(&rx, &m);
222224

0 commit comments

Comments
 (0)