[qca-nss-drv] Pass device pointer to dma map/unmap
Passing NULL to dma map/unmap would fail on some platform (ex. ARM64).
Pass the original device pointer instead.
Change-Id: I1c36adc0eaf592dd704781a2ea1651b864680f4a
Signed-off-by: Stephen Wang <wstephen@codeaurora.org>
diff --git a/nss_n2h.c b/nss_n2h.c
index 54df82b..f6586dd 100644
--- a/nss_n2h.c
+++ b/nss_n2h.c
@@ -1,6 +1,6 @@
/*
**************************************************************************
- * Copyright (c) 2013-2016, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2017, The Linux Foundation. All rights reserved.
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
* above copyright notice and this permission notice appear in all copies.
@@ -930,7 +930,7 @@
}
buf_pool->nss_buf_pool_vaddr[page_count] = kern_addr;
- buf_pool->nss_buf_pool_addr[page_count] = dma_map_single(NULL, kern_addr, PAGE_SIZE, DMA_TO_DEVICE);
+ buf_pool->nss_buf_pool_addr[page_count] = dma_map_single(nss_ctx->dev, kern_addr, PAGE_SIZE, DMA_TO_DEVICE);
}
buf_pool->nss_buf_num_pages = page_count;