diff options
author | Scott Long <scottl@FreeBSD.org> | 2018-02-06 06:42:25 +0000 |
---|---|---|
committer | Scott Long <scottl@FreeBSD.org> | 2018-02-06 06:42:25 +0000 |
commit | 99e7a4ad9e6fe53868cb15449667ad46814d692b (patch) | |
tree | dd1f69f49785e64aaff2cfabbcb463555c431816 /sys/cam/nvme/nvme_da.c | |
parent | 87dda4ed5d3d34f339a5a8e1643627c1f28001dc (diff) | |
download | src-99e7a4ad9e6fe53868cb15449667ad46814d692b.tar.gz src-99e7a4ad9e6fe53868cb15449667ad46814d692b.zip |
Return a C errno for cam_periph_acquire().
There's no compelling reason to return a cam_status type for this
function and doing so only creates confusion with normal C
coding practices. It's technically an API change, but the periph API
isn't widely used. No efffective change to operation.
Reviewed by: imp, mav, ken
Sponsored by: Netflix
Differential Revision: D14063
Notes
Notes:
svn path=/head/; revision=328918
Diffstat (limited to 'sys/cam/nvme/nvme_da.c')
-rw-r--r-- | sys/cam/nvme/nvme_da.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/cam/nvme/nvme_da.c b/sys/cam/nvme/nvme_da.c index b120a414629d..40ef7c70765f 100644 --- a/sys/cam/nvme/nvme_da.c +++ b/sys/cam/nvme/nvme_da.c @@ -260,7 +260,7 @@ ndaopen(struct disk *dp) int error; periph = (struct cam_periph *)dp->d_drv1; - if (cam_periph_acquire(periph) != CAM_REQ_CMP) { + if (cam_periph_acquire(periph) != 0) { return(ENXIO); } @@ -785,7 +785,7 @@ ndaregister(struct cam_periph *periph, void *arg) * We'll release this reference once GEOM calls us back (via * ndadiskgonecb()) telling us that our provider has been freed. */ - if (cam_periph_acquire(periph) != CAM_REQ_CMP) { + if (cam_periph_acquire(periph) != 0) { xpt_print(periph->path, "%s: lost periph during " "registration!\n", __func__); cam_periph_lock(periph); @@ -807,7 +807,7 @@ ndaregister(struct cam_periph *periph, void *arg) * Create our sysctl variables, now that we know * we have successfully attached. */ - if (cam_periph_acquire(periph) == CAM_REQ_CMP) + if (cam_periph_acquire(periph) == 0) taskqueue_enqueue(taskqueue_thread, &softc->sysctl_task); /* |