diff options
Diffstat (limited to 'include/scsi/scsi_cmnd.h')
-rw-r--r-- | include/scsi/scsi_cmnd.h | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h index ac06cc595890..de5f5d8f1f8a 100644 --- a/include/scsi/scsi_cmnd.h +++ b/include/scsi/scsi_cmnd.h | |||
@@ -132,18 +132,10 @@ struct scsi_cmnd { | |||
132 | unsigned char tag; /* SCSI-II queued command tag */ | 132 | unsigned char tag; /* SCSI-II queued command tag */ |
133 | }; | 133 | }; |
134 | 134 | ||
135 | /* make sure not to use it with REQ_TYPE_BLOCK_PC commands */ | ||
135 | static inline struct scsi_driver *scsi_cmd_to_driver(struct scsi_cmnd *cmd) | 136 | static inline struct scsi_driver *scsi_cmd_to_driver(struct scsi_cmnd *cmd) |
136 | { | 137 | { |
137 | struct scsi_driver **sdp; | 138 | return *(struct scsi_driver **)cmd->request->rq_disk->private_data; |
138 | |||
139 | if (!cmd->request->rq_disk) | ||
140 | return NULL; | ||
141 | |||
142 | sdp = (struct scsi_driver **)cmd->request->rq_disk->private_data; | ||
143 | if (!sdp) | ||
144 | return NULL; | ||
145 | |||
146 | return *sdp; | ||
147 | } | 139 | } |
148 | 140 | ||
149 | extern struct scsi_cmnd *scsi_get_command(struct scsi_device *, gfp_t); | 141 | extern struct scsi_cmnd *scsi_get_command(struct scsi_device *, gfp_t); |