aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/net/nfc/nci/spi.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/nfc/nci/spi.c')
-rw-r--r--net/nfc/nci/spi.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/nfc/nci/spi.c b/net/nfc/nci/spi.c
index d904cd2f1442..452f4c16b7a9 100644
--- a/net/nfc/nci/spi.c
+++ b/net/nfc/nci/spi.c
@@ -86,8 +86,8 @@ int nci_spi_send(struct nci_spi *nspi,
u16 crc;
crc = crc_ccitt(CRC_INIT, skb->data, skb->len);
- *skb_put(skb, 1) = crc >> 8;
- *skb_put(skb, 1) = crc & 0xFF;
+ skb_put_u8(skb, crc >> 8);
+ skb_put_u8(skb, crc & 0xFF);
}
if (write_handshake_completion) {
@@ -172,8 +172,8 @@ static int send_acknowledge(struct nci_spi *nspi, u8 acknowledge)
hdr[3] = 0;
crc = crc_ccitt(CRC_INIT, skb->data, skb->len);
- *skb_put(skb, 1) = crc >> 8;
- *skb_put(skb, 1) = crc & 0xFF;
+ skb_put_u8(skb, crc >> 8);
+ skb_put_u8(skb, crc & 0xFF);
ret = __nci_spi_send(nspi, skb, 0);
@@ -238,8 +238,8 @@ static struct sk_buff *__nci_spi_read(struct nci_spi *nspi)
goto receive_error;
if (nspi->acknowledge_mode == NCI_SPI_CRC_ENABLED) {
- *skb_push(skb, 1) = resp_hdr[1];
- *skb_push(skb, 1) = resp_hdr[0];
+ *(u8 *)skb_push(skb, 1) = resp_hdr[1];
+ *(u8 *)skb_push(skb, 1) = resp_hdr[0];
}
return skb;