summaryrefslogtreecommitdiff
path: root/drivers/usb/storage
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2021-08-09 16:03:54 -0700
committerMartin K. Petersen <martin.petersen@oracle.com>2021-08-11 22:25:42 -0400
commit9c4a6d5281854e1491acd51c7e3794c5d00574ce (patch)
treec2b2302804ee14576866473219866a562c7fedf4 /drivers/usb/storage
parentcb22f89e7a12a4a9b3a203b78b3c9a275693d47f (diff)
scsi: usb-storage: Use scsi_cmd_to_rq() instead of scsi_cmnd.request
Prepare for removal of the request pointer by using scsi_cmd_to_rq() instead. This patch does not change any functionality. Link: https://lore.kernel.org/r/20210809230355.8186-52-bvanassche@acm.org Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/usb/storage')
-rw-r--r--drivers/usb/storage/transport.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c
index f4304ce69350..4c5a0a49035f 100644
--- a/drivers/usb/storage/transport.c
+++ b/drivers/usb/storage/transport.c
@@ -551,7 +551,7 @@ static void last_sector_hacks(struct us_data *us, struct scsi_cmnd *srb)
/* Did this command access the last sector? */
sector = (srb->cmnd[2] << 24) | (srb->cmnd[3] << 16) |
(srb->cmnd[4] << 8) | (srb->cmnd[5]);
- disk = srb->request->rq_disk;
+ disk = scsi_cmd_to_rq(srb)->rq_disk;
if (!disk)
goto done;
sdkp = scsi_disk(disk);