summaryrefslogtreecommitdiffstats
path: root/drivers/block/skd_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/skd_main.c')
-rw-r--r--drivers/block/skd_main.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/block/skd_main.c b/drivers/block/skd_main.c
index de0d08133c7e..e41935ab41ef 100644
--- a/drivers/block/skd_main.c
+++ b/drivers/block/skd_main.c
@@ -32,7 +32,6 @@
#include <linux/aer.h>
#include <linux/wait.h>
#include <linux/stringify.h>
-#include <linux/slab_def.h>
#include <scsi/scsi.h>
#include <scsi/sg.h>
#include <linux/io.h>
@@ -2603,7 +2602,8 @@ static void *skd_alloc_dma(struct skd_device *skdev, struct kmem_cache *s,
buf = kmem_cache_alloc(s, gfp);
if (!buf)
return NULL;
- *dma_handle = dma_map_single(dev, buf, s->size, dir);
+ *dma_handle = dma_map_single(dev, buf,
+ kmem_cache_size(s), dir);
if (dma_mapping_error(dev, *dma_handle)) {
kmem_cache_free(s, buf);
buf = NULL;
@@ -2618,7 +2618,8 @@ static void skd_free_dma(struct skd_device *skdev, struct kmem_cache *s,
if (!vaddr)
return;
- dma_unmap_single(&skdev->pdev->dev, dma_handle, s->size, dir);
+ dma_unmap_single(&skdev->pdev->dev, dma_handle,
+ kmem_cache_size(s), dir);
kmem_cache_free(s, vaddr);
}