summaryrefslogtreecommitdiff
path: root/drivers/scsi/isci/request.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2011-02-08 17:53:10 -0800
committerDan Williams <dan.j.williams@intel.com>2011-07-03 00:36:31 -0700
commit82d29928c1c1c6a6605895f8240a9943394244d7 (patch)
tree7f5726aba78d9f4894125423024c9b8922f61cfd /drivers/scsi/isci/request.c
parenta7e536c7d6f1796e8727f5c90d33765ae7cfd8d8 (diff)
isci: kill SCI_IO_REQUEST_DATA_DIRECTION
It's an unnecessary typedef that mirrors the kernel's enum dma_data_direction. Also cleanup some long variable names along the way. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/scsi/isci/request.c')
-rw-r--r--drivers/scsi/isci/request.c36
1 files changed, 2 insertions, 34 deletions
diff --git a/drivers/scsi/isci/request.c b/drivers/scsi/isci/request.c
index e564121b6726..f7ba047d64ce 100644
--- a/drivers/scsi/isci/request.c
+++ b/drivers/scsi/isci/request.c
@@ -1237,44 +1237,12 @@ u32 isci_request_io_request_get_transfer_length(struct isci_request *request)
*
* data direction for specified request.
*/
-SCI_IO_REQUEST_DATA_DIRECTION isci_request_io_request_get_data_direction(
+enum dma_data_direction isci_request_io_request_get_data_direction(
struct isci_request *request)
{
struct sas_task *task = isci_request_access_task(request);
- SCI_IO_REQUEST_DATA_DIRECTION ret;
- switch (task->data_dir) {
-
- case DMA_FROM_DEVICE:
- ret = SCI_IO_REQUEST_DATA_IN;
- dev_dbg(&request->isci_host->pdev->dev,
- "%s: request=%p, FROM_DEVICE\n",
- __func__,
- request);
- break;
-
- case DMA_TO_DEVICE:
- ret = SCI_IO_REQUEST_DATA_OUT;
- dev_dbg(&request->isci_host->pdev->dev,
- "%s: request=%p, TO_DEVICE\n",
- __func__,
- request);
- break;
-
- case DMA_BIDIRECTIONAL:
- case DMA_NONE:
- default:
- ret = SCI_IO_REQUEST_NO_DATA;
- dev_dbg(&request->isci_host->pdev->dev,
- "%s: request=%p, unhandled direction case, "
- "data_dir=%d\n",
- __func__,
- request,
- task->data_dir);
- break;
-
- }
- return ret;
+ return task->data_dir;
}
/**