#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>
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;
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);
}