Module: xenomai-head
Branch: master
Commit: 0440e306d30e964140a0153acb448e5744b20fac
URL:    
http://git.xenomai.org/?p=xenomai-head.git;a=commit;h=0440e306d30e964140a0153acb448e5744b20fac

Author: Philippe Gerum <r...@xenomai.org>
Date:   Thu Feb  3 12:00:49 2011 +0100

drivers: stop using legacy init_MUTEX()

---

 ksrc/drivers/can/rtcan_dev.c      |    2 +-
 ksrc/drivers/testing/irqbench.c   |    2 +-
 ksrc/drivers/testing/switchtest.c |    2 +-
 ksrc/drivers/testing/timerbench.c |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/ksrc/drivers/can/rtcan_dev.c b/ksrc/drivers/can/rtcan_dev.c
index 0697b3b..262c1e8 100644
--- a/ksrc/drivers/can/rtcan_dev.c
+++ b/ksrc/drivers/can/rtcan_dev.c
@@ -171,7 +171,7 @@ struct rtcan_device *rtcan_dev_alloc(int sizeof_priv, int 
sizeof_board_priv)
 
     memset(dev, 0, alloc_size);
 
-    init_MUTEX(&dev->nrt_lock);
+    sema_init(&dev->nrt_lock, 1);
 
     rtdm_lock_init(&dev->device_lock);
 
diff --git a/ksrc/drivers/testing/irqbench.c b/ksrc/drivers/testing/irqbench.c
index ab9686a..b35dfd0 100644
--- a/ksrc/drivers/testing/irqbench.c
+++ b/ksrc/drivers/testing/irqbench.c
@@ -216,7 +216,7 @@ static int rt_irqbench_open(struct rtdm_dev_context 
*context,
        ctx = (struct rt_irqbench_context *)context->dev_private;
        ctx->mode = -1;
        rtdm_event_init(&ctx->irq_event, 0);
-       init_MUTEX(&ctx->nrt_mutex);
+       sema_init(&ctx->nrt_mutex, 1);
 
        return 0;
 }
diff --git a/ksrc/drivers/testing/switchtest.c 
b/ksrc/drivers/testing/switchtest.c
index e335bfb..b1f6acb 100644
--- a/ksrc/drivers/testing/switchtest.c
+++ b/ksrc/drivers/testing/switchtest.c
@@ -513,7 +513,7 @@ static int rtswitch_open(struct rtdm_dev_context *context,
 
        ctx->tasks = NULL;
        ctx->tasks_count = ctx->next_index = ctx->cpu = ctx->switches_count = 0;
-       init_MUTEX(&ctx->lock);
+       sema_init(&ctx->lock, 1);
        ctx->failed = 0;
        ctx->error.last_switch.from = ctx->error.last_switch.to = -1;
        ctx->pause_us = 0;
diff --git a/ksrc/drivers/testing/timerbench.c 
b/ksrc/drivers/testing/timerbench.c
index fcd040d..cbd2866 100644
--- a/ksrc/drivers/testing/timerbench.c
+++ b/ksrc/drivers/testing/timerbench.c
@@ -198,7 +198,7 @@ static int rt_tmbench_open(struct rtdm_dev_context *context,
        ctx = (struct rt_tmbench_context *)context->dev_private;
 
        ctx->mode = RTTST_TMBENCH_INVALID;
-       init_MUTEX(&ctx->nrt_mutex);
+       sema_init(&ctx->nrt_mutex, 1);
 
        return 0;
 }


_______________________________________________
Xenomai-git mailing list
Xenomai-git@gna.org
https://mail.gna.org/listinfo/xenomai-git

Reply via email to