diff options
Diffstat (limited to 'sys/cam/cam_periph.c')
-rw-r--r-- | sys/cam/cam_periph.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/cam/cam_periph.c b/sys/cam/cam_periph.c index 6cb4583e92d8..e563b7f46abb 100644 --- a/sys/cam/cam_periph.c +++ b/sys/cam/cam_periph.c @@ -403,19 +403,19 @@ retry: return (count); } -cam_status +int cam_periph_acquire(struct cam_periph *periph) { - cam_status status; + int status; - status = CAM_REQ_CMP_ERR; if (periph == NULL) - return (status); + return (EINVAL); + status = ENOENT; xpt_lock_buses(); if ((periph->flags & CAM_PERIPH_INVALID) == 0) { periph->refcount++; - status = CAM_REQ_CMP; + status = 0; } xpt_unlock_buses(); @@ -482,7 +482,7 @@ cam_periph_hold(struct cam_periph *periph, int priority) * from user us while we sleep. */ - if (cam_periph_acquire(periph) != CAM_REQ_CMP) + if (cam_periph_acquire(periph) != 0) return (ENXIO); cam_periph_assert(periph, MA_OWNED); |