]> git.karo-electronics.de Git - linux-beck.git/blobdiff - include/scsi/scsi_cmnd.h
Merge tag 'md/3.16-fixes' of git://neil.brown.name/md
[linux-beck.git] / include / scsi / scsi_cmnd.h
index a100c6e266c7d4037e872af5a5961c915462e2d7..42ed789ebafcf9ab04c759d7ef167e981aab2bc6 100644 (file)
@@ -134,6 +134,15 @@ struct scsi_cmnd {
        unsigned char tag;      /* SCSI-II queued command tag */
 };
 
+/*
+ * Return the driver private allocation behind the command.
+ * Only works if cmd_size is set in the host template.
+ */
+static inline void *scsi_cmd_priv(struct scsi_cmnd *cmd)
+{
+       return cmd + 1;
+}
+
 /* make sure not to use it with REQ_TYPE_BLOCK_PC commands */
 static inline struct scsi_driver *scsi_cmd_to_driver(struct scsi_cmnd *cmd)
 {