From: FUJITA Tomonori Date: Fri, 25 May 2007 19:51:32 +0000 (+0900) Subject: [SCSI] esp_scsi: convert to use the data buffer accessors X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4c2baaaf2ba4875d1d2d59b3b3e1216d3277b17a;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [SCSI] esp_scsi: convert to use the data buffer accessors - convert to use the new accessors for the sg lists and the parameters. Signed-off-by: FUJITA Tomonori Cc: David Miller Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/esp_scsi.c b/drivers/scsi/esp_scsi.c index 2321f3db4623..c1d50e669c43 100644 --- a/drivers/scsi/esp_scsi.c +++ b/drivers/scsi/esp_scsi.c @@ -324,17 +324,14 @@ static void esp_reset_esp(struct esp *esp) static void esp_map_dma(struct esp *esp, struct scsi_cmnd *cmd) { struct esp_cmd_priv *spriv = ESP_CMD_PRIV(cmd); - struct scatterlist *sg = cmd->request_buffer; + struct scatterlist *sg = scsi_sglist(cmd); int dir = cmd->sc_data_direction; int total, i; if (dir == DMA_NONE) return; - BUG_ON(cmd->use_sg == 0); - - spriv->u.num_sg = esp->ops->map_sg(esp, sg, - cmd->use_sg, dir); + spriv->u.num_sg = esp->ops->map_sg(esp, sg, scsi_sg_count(cmd), dir); spriv->cur_residue = sg_dma_len(sg); spriv->cur_sg = sg; @@ -407,8 +404,7 @@ static void esp_unmap_dma(struct esp *esp, struct scsi_cmnd *cmd) if (dir == DMA_NONE) return; - esp->ops->unmap_sg(esp, cmd->request_buffer, - spriv->u.num_sg, dir); + esp->ops->unmap_sg(esp, scsi_sglist(cmd), spriv->u.num_sg, dir); } static void esp_save_pointers(struct esp *esp, struct esp_cmd_entry *ent)