From 0b2be958e998d1808e4f950f8fe1e8bdeacb49fa Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Thu, 30 Oct 2008 12:34:48 +0000 Subject: [PATCH] The patch below makes the srpt driver compile against the 2.6.27 kernel headers. Signed-off-by: Bart Van Assche Acked-by: Vu Pham git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@551 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- srpt/src/ib_srpt.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/srpt/src/ib_srpt.c b/srpt/src/ib_srpt.c index d25d2c649..f534179d0 100644 --- a/srpt/src/ib_srpt.c +++ b/srpt/src/ib_srpt.c @@ -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;