]> git.karo-electronics.de Git - linux-beck.git/blobdiff - include/scsi/scsi_cmnd.h
Merge tag 'blackfin-for-linus' of http://git.kernel.org/pub/scm/linux/kernel/git...
[linux-beck.git] / include / scsi / scsi_cmnd.h
index dd7c998221b3e7a0253c11426a7940a328279248..e016e2ac38df8f6c570980a4624e9ccaefd0dd5e 100644 (file)
@@ -133,6 +133,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)
 {