diff options
-rw-r--r-- | include/scsi/scsi_cmnd.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h index de28aab820b0..b260be6d0d73 100644 --- a/include/scsi/scsi_cmnd.h +++ b/include/scsi/scsi_cmnd.h | |||
@@ -175,4 +175,18 @@ static inline struct scsi_data_buffer *scsi_out(struct scsi_cmnd *cmd) | |||
175 | return &cmd->sdb; | 175 | return &cmd->sdb; |
176 | } | 176 | } |
177 | 177 | ||
178 | static inline int scsi_sg_copy_from_buffer(struct scsi_cmnd *cmd, | ||
179 | void *buf, int buflen) | ||
180 | { | ||
181 | return sg_copy_from_buffer(scsi_sglist(cmd), scsi_sg_count(cmd), | ||
182 | buf, buflen); | ||
183 | } | ||
184 | |||
185 | static inline int scsi_sg_copy_to_buffer(struct scsi_cmnd *cmd, | ||
186 | void *buf, int buflen) | ||
187 | { | ||
188 | return sg_copy_to_buffer(scsi_sglist(cmd), scsi_sg_count(cmd), | ||
189 | buf, buflen); | ||
190 | } | ||
191 | |||
178 | #endif /* _SCSI_SCSI_CMND_H */ | 192 | #endif /* _SCSI_SCSI_CMND_H */ |