The patch below makes the srpt driver compile against the 2.6.27 kernel

headers.

Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>
Acked-by: Vu Pham <vu@mellanox.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@551 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2008-10-30 12:34:48 +00:00
parent b35c83dbe2
commit 0b2be958e9

View File

@@ -425,7 +425,11 @@ static struct srpt_ioctx *srpt_alloc_ioctx(struct srpt_device *sdev)
ioctx->dma = dma_map_single(sdev->device->dma_device, ioctx->buf,
MAX_MESSAGE_SIZE, DMA_BIDIRECTIONAL);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
if (dma_mapping_error(sdev->device->dma_device, ioctx->dma))
#else
if (dma_mapping_error(ioctx->dma))
#endif
goto out_free_buf;
return ioctx;