linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] NFC: port100: convert to use le16_add_cpu()
@ 2013-10-30  5:26 Wei Yongjun
  0 siblings, 0 replies; only message in thread
From: Wei Yongjun @ 2013-10-30  5:26 UTC (permalink / raw)
  To: lauro.venancio, aloisio.almeida, sameo
  Cc: yongjun_wei, linux-wireless, linux-nfc

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Convert cpu_to_le16(le16_to_cpu(E1) + E2) to use le16_add_cpu().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 drivers/nfc/port100.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nfc/port100.c b/drivers/nfc/port100.c
index 8a0571e..ab7afe3 100644
--- a/drivers/nfc/port100.c
+++ b/drivers/nfc/port100.c
@@ -493,7 +493,7 @@ static void port100_tx_update_payload_len(void *_frame, int len)
 {
 	struct port100_frame *frame = _frame;
 
-	frame->datalen = cpu_to_le16(le16_to_cpu(frame->datalen) + len);
+	le16_add_cpu(&frame->datalen, len);
 }
 
 static bool port100_rx_frame_is_valid(void *_frame)


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-10-30  5:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-30  5:26 [PATCH -next] NFC: port100: convert to use le16_add_cpu() Wei Yongjun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).