svn commit: r198377 - head/sys/cam
Alexander Motin
mav at FreeBSD.org
Thu Oct 22 21:07:33 UTC 2009
Author: mav
Date: Thu Oct 22 21:07:32 2009
New Revision: 198377
URL: http://svn.freebsd.org/changeset/base/198377
Log:
After thinking again, implement cam_ccbq_fini().
This is effectively NULL change, but makes this API a bit more consistent.
Modified:
head/sys/cam/cam_queue.c
head/sys/cam/cam_queue.h
head/sys/cam/cam_xpt.c
Modified: head/sys/cam/cam_queue.c
==============================================================================
--- head/sys/cam/cam_queue.c Thu Oct 22 21:01:41 2009 (r198376)
+++ head/sys/cam/cam_queue.c Thu Oct 22 21:07:32 2009 (r198377)
@@ -289,7 +289,7 @@ void
cam_ccbq_free(struct cam_ccbq *ccbq)
{
if (ccbq) {
- camq_fini(&ccbq->queue);
+ cam_ccbq_fini(ccbq);
free(ccbq, M_CAMCCBQ);
}
}
@@ -338,6 +338,13 @@ cam_ccbq_init(struct cam_ccbq *ccbq, int
return (0);
}
+void
+cam_ccbq_fini(struct cam_ccbq *ccbq)
+{
+
+ camq_fini(&ccbq->queue);
+}
+
/*
* Heap routines for manipulating CAM queues.
*/
Modified: head/sys/cam/cam_queue.h
==============================================================================
--- head/sys/cam/cam_queue.h Thu Oct 22 21:01:41 2009 (r198376)
+++ head/sys/cam/cam_queue.h Thu Oct 22 21:07:32 2009 (r198377)
@@ -96,6 +96,8 @@ int cam_ccbq_init(struct cam_ccbq *ccbq
void cam_ccbq_free(struct cam_ccbq *ccbq);
+void cam_ccbq_fini(struct cam_ccbq *ccbq);
+
/*
* Allocate and initialize a cam_queue structure.
*/
Modified: head/sys/cam/cam_xpt.c
==============================================================================
--- head/sys/cam/cam_xpt.c Thu Oct 22 21:01:41 2009 (r198376)
+++ head/sys/cam/cam_xpt.c Thu Oct 22 21:07:32 2009 (r198377)
@@ -4447,7 +4447,7 @@ xpt_release_device(struct cam_eb *bus, s
devq = bus->sim->devq;
cam_devq_resize(devq, devq->alloc_queue.array_size - 1);
camq_fini(&device->drvq);
- camq_fini(&device->ccbq.queue);
+ cam_ccbq_fini(&device->ccbq);
free(device, M_CAMXPT);
xpt_release_target(bus, target);
}
More information about the svn-src-all
mailing list