diff options
Diffstat (limited to 'include/scsi/scsi_cmnd.h')
-rw-r--r-- | include/scsi/scsi_cmnd.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h index 9be0128bf303..377df4a28512 100644 --- a/include/scsi/scsi_cmnd.h +++ b/include/scsi/scsi_cmnd.h | |||
@@ -10,6 +10,7 @@ | |||
10 | 10 | ||
11 | struct Scsi_Host; | 11 | struct Scsi_Host; |
12 | struct scsi_device; | 12 | struct scsi_device; |
13 | struct scsi_driver; | ||
13 | 14 | ||
14 | /* | 15 | /* |
15 | * MAX_COMMAND_SIZE is: | 16 | * MAX_COMMAND_SIZE is: |
@@ -131,6 +132,11 @@ struct scsi_cmnd { | |||
131 | unsigned char tag; /* SCSI-II queued command tag */ | 132 | unsigned char tag; /* SCSI-II queued command tag */ |
132 | }; | 133 | }; |
133 | 134 | ||
135 | static inline struct scsi_driver *scsi_cmd_to_driver(struct scsi_cmnd *cmd) | ||
136 | { | ||
137 | return *(struct scsi_driver **)cmd->request->rq_disk->private_data; | ||
138 | } | ||
139 | |||
134 | extern struct scsi_cmnd *scsi_get_command(struct scsi_device *, gfp_t); | 140 | extern struct scsi_cmnd *scsi_get_command(struct scsi_device *, gfp_t); |
135 | extern struct scsi_cmnd *__scsi_get_command(struct Scsi_Host *, gfp_t); | 141 | extern struct scsi_cmnd *__scsi_get_command(struct Scsi_Host *, gfp_t); |
136 | extern void scsi_put_command(struct scsi_cmnd *); | 142 | extern void scsi_put_command(struct scsi_cmnd *); |