- if(workrequ->use_sg)
- pci_unmap_sg(dev->pdev, (struct scatterlist *)workrequ->buffer, workrequ->use_sg, scsi_to_pci_dma_dir(workrequ->sc_data_direction));
- else if(workrequ->request_bufflen && workrequ->sc_data_direction != SCSI_DATA_NONE)
- pci_unmap_single(dev->pdev, workrequ->SCp.dma_handle, workrequ->request_bufflen, scsi_to_pci_dma_dir(workrequ->sc_data_direction));
+ if (workrequ->use_sg) {
+ pci_unmap_sg(dev->pdev,
+ (struct scatterlist *)workrequ->buffer,
+ workrequ->use_sg,
+ workrequ->sc_data_direction);
+ } else if (workrequ->request_bufflen &&
+ workrequ->sc_data_direction != DMA_NONE) {
+ pci_unmap_single(dev->pdev,
+ workrequ->SCp.dma_handle,
+ workrequ->request_bufflen,
+ workrequ->sc_data_direction);
+ }