summaryrefslogtreecommitdiff
path: root/include/scsi/osd_initiator.h
diff options
context:
space:
mode:
authorBoaz Harrosh <bharrosh@panasas.com>2009-11-16 21:39:25 +0300
committerJames Bottomley <James.Bottomley@suse.de>2009-12-04 21:01:44 +0300
commitd531b37929f412de09e9ad711fdd5b04fa39aca1 (patch)
tree058897292c2647e33b1959a88b847e7004f72810 /include/scsi/osd_initiator.h
parent0d48fcca1ff5d106b0ac6770a31b13e3630b244a (diff)
downloadlinux-d531b37929f412de09e9ad711fdd5b04fa39aca1.tar.xz
[SCSI] libosd: osd_dev_is_ver1 - Minor API cleanup
define a new osd_dev_is_ver1 that operates on devices and the old osd_req_is_ver1 uses that new API. Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'include/scsi/osd_initiator.h')
-rw-r--r--include/scsi/osd_initiator.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/include/scsi/osd_initiator.h b/include/scsi/osd_initiator.h
index 02bd9f716357..f787d24d3bab 100644
--- a/include/scsi/osd_initiator.h
+++ b/include/scsi/osd_initiator.h
@@ -84,6 +84,15 @@ static inline void osd_dev_set_ver(struct osd_dev *od, enum osd_std_version v)
#endif
}
+static inline bool osd_dev_is_ver1(struct osd_dev *od)
+{
+#ifdef OSD_VER1_SUPPORT
+ return od->version == OSD_VER1;
+#else
+ return false;
+#endif
+}
+
struct osd_request;
typedef void (osd_req_done_fn)(struct osd_request *or, void *private);
@@ -120,14 +129,9 @@ struct osd_request {
int async_error;
};
-/* OSD Version control */
static inline bool osd_req_is_ver1(struct osd_request *or)
{
-#ifdef OSD_VER1_SUPPORT
- return or->osd_dev->version == OSD_VER1;
-#else
- return false;
-#endif
+ return osd_dev_is_ver1(or->osd_dev);
}
/*