From 495d7f2c47a2a51a1df62b372e8caeb30e174dfc Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Mon, 29 Nov 2021 15:28:12 -0800 Subject: [PATCH] ANDROID: scsi: Introduce scsi_done() Before backporting upstream patches that use scsi_done(), introduce that function. See also upstream commit a710eacb9d13 ("scsi: core: Rename scsi_mq_done() into scsi_done() and export it"). Bug: 204438323 Change-Id: Ic6624fe7b9958febea28ef37b3fe5f37a573c7ee Signed-off-by: Bart Van Assche --- include/scsi/scsi_cmnd.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h index e8389b00ee74..4c08a7bd969f 100644 --- a/include/scsi/scsi_cmnd.h +++ b/include/scsi/scsi_cmnd.h @@ -173,6 +173,12 @@ static inline struct scsi_driver *scsi_cmd_to_driver(struct scsi_cmnd *cmd) return *(struct scsi_driver **)rq->rq_disk->private_data; } +/* A helper function to make it easier to backport upstream SCSI patches. */ +static inline void scsi_done(struct scsi_cmnd *cmd) +{ + cmd->scsi_done(cmd); +} + extern void scsi_finish_command(struct scsi_cmnd *cmd); extern void *scsi_kmap_atomic_sg(struct scatterlist *sg, int sg_count,