summaryrefslogtreecommitdiff
path: root/components/drivers
diff options
context:
space:
mode:
authorwuyangyong <[email protected]>2012-09-28 15:26:19 +0000
committerwuyangyong <[email protected]>2012-09-28 15:26:19 +0000
commit2aab960999e9580fa862ded9c27663dde8f70b9d (patch)
tree36e2832bf629f9f40912a874790fb7b7e5a62679 /components/drivers
parent9809c138b73d3cbe1a3ba3a1c801af6601f7d8f4 (diff)
fixed rt_spi_release_bus assert error.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2310 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'components/drivers')
-rw-r--r--components/drivers/spi/spi_core.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/components/drivers/spi/spi_core.c b/components/drivers/spi/spi_core.c
index cdde51fcd1..65d99b887e 100644
--- a/components/drivers/spi/spi_core.c
+++ b/components/drivers/spi/spi_core.c
@@ -9,6 +9,12 @@
*
* Change Logs:
* Date Author Notes
+ * 2012-01-08 bernard first version.
+ * 2012-02-03 bernard add const attribute to the ops.
+ * 2012-05-15 dzzxzz fixed the return value in attach_device.
+ * 2012-05-18 bernard Changed SPI message to message list.
+ * Added take/release SPI device/bus interface.
+ * 2012-09-28 aozima fixed rt_spi_release_bus assert error.
*/
#include <drivers/spi.h>
@@ -416,7 +422,7 @@ rt_err_t rt_spi_release_bus(struct rt_spi_device *device)
{
RT_ASSERT(device != RT_NULL);
RT_ASSERT(device->bus != RT_NULL);
- RT_ASSERT(device->bus->owner != device);
+ RT_ASSERT(device->bus->owner == device);
/* release lock */
rt_mutex_release(&(device->bus->lock));