aboutsummaryrefslogtreecommitdiff
path: root/sys/cam/mmc
diff options
context:
space:
mode:
authorScott Long <scottl@FreeBSD.org>2018-02-06 06:42:25 +0000
committerScott Long <scottl@FreeBSD.org>2018-02-06 06:42:25 +0000
commit99e7a4ad9e6fe53868cb15449667ad46814d692b (patch)
treedd1f69f49785e64aaff2cfabbcb463555c431816 /sys/cam/mmc
parent87dda4ed5d3d34f339a5a8e1643627c1f28001dc (diff)
downloadsrc-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/mmc')
-rw-r--r--sys/cam/mmc/mmc_da.c4
-rw-r--r--sys/cam/mmc/mmc_xpt.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/sys/cam/mmc/mmc_da.c b/sys/cam/mmc/mmc_da.c
index dd865ae374a4..84095f48f6ef 100644
--- a/sys/cam/mmc/mmc_da.c
+++ b/sys/cam/mmc/mmc_da.c
@@ -369,7 +369,7 @@ sddaopen(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);
}
@@ -744,7 +744,7 @@ sdda_hook_into_geom(struct cam_periph *periph)
* We'll release this reference once GEOM calls us back (via
* sddadiskgonecb()) 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);
diff --git a/sys/cam/mmc/mmc_xpt.c b/sys/cam/mmc/mmc_xpt.c
index 4837b4847ed1..d2cb8bd8f14f 100644
--- a/sys/cam/mmc/mmc_xpt.c
+++ b/sys/cam/mmc/mmc_xpt.c
@@ -471,9 +471,9 @@ probe_periph_init()
static cam_status
mmcprobe_register(struct cam_periph *periph, void *arg)
{
- union ccb *request_ccb; /* CCB representing the probe request */
- cam_status status;
mmcprobe_softc *softc;
+ union ccb *request_ccb; /* CCB representing the probe request */
+ int status;
CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("mmcprobe_register\n"));
@@ -501,10 +501,10 @@ mmcprobe_register(struct cam_periph *periph, void *arg)
status = cam_periph_acquire(periph);
memset(&periph->path->device->mmc_ident_data, 0, sizeof(struct mmc_params));
- if (status != CAM_REQ_CMP) {
+ if (status != 0) {
printf("proberegister: cam_periph_acquire failed (status=%d)\n",
status);
- return (status);
+ return (CAM_REQ_CMP_ERR);
}
CAM_DEBUG(periph->path, CAM_DEBUG_PROBE, ("Probe started\n"));