diff options
author | Pete Wyckoff <pw@osc.edu> | 2008-01-01 15:23:02 (GMT) |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2008-01-28 09:04:46 (GMT) |
commit | 482eb689169948e9f4966fbae6be4d6bc0bfa818 (patch) | |
tree | 93f2e9915b34192a92442fbf800d3a9b47819909 /include/linux/blkdev.h | |
parent | 6da127ad0918f93ea93678dad62ce15ffed18797 (diff) | |
download | linux-fsl-qoriq-482eb689169948e9f4966fbae6be4d6bc0bfa818.tar.xz |
block: allow queue dma_alignment of zero
Let queue_dma_alignment return 0 if it was specifically set to 0.
This permits devices with no particular alignment restrictions to
use arbitrary user space buffers without copying.
Signed-off-by: Pete Wyckoff <pw@osc.edu>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'include/linux/blkdev.h')
-rw-r--r-- | include/linux/blkdev.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 49b7a4c..c7a3ab5 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -836,12 +836,7 @@ static inline int bdev_hardsect_size(struct block_device *bdev) static inline int queue_dma_alignment(struct request_queue *q) { - int retval = 511; - - if (q && q->dma_alignment) - retval = q->dma_alignment; - - return retval; + return q ? q->dma_alignment : 511; } /* assumes size > 256 */ |