Skip to content

Commit

Permalink
[SCSI] libosd: osd_dev_is_ver1 - Minor API cleanup
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Boaz Harrosh authored and James Bottomley committed Dec 4, 2009
1 parent 0d48fcc commit d531b37
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions include/scsi/osd_initiator.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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);
}

/*
Expand Down

0 comments on commit d531b37

Please sign in to comment.