From: Jan Kiszka <jan.kis...@siemens.com>

This is deprecated now, RT callers will automatically be migrated to
NRT to perform the requests. Moreover, dropping it allows us to allocate
resources from Linux instead of using the precious system heap.

CC: Philippe Gerum <r...@xenomai.org>
Signed-off-by: Jan Kiszka <jan.kis...@siemens.com>
---
 ksrc/drivers/ipc/rtipc.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/ksrc/drivers/ipc/rtipc.c b/ksrc/drivers/ipc/rtipc.c
index 563cc4e..71629cb 100644
--- a/ksrc/drivers/ipc/rtipc.c
+++ b/ksrc/drivers/ipc/rtipc.c
@@ -158,13 +158,13 @@ static int rtipc_socket(struct rtdm_dev_context *context,
 
        p = rtdm_context_to_private(context);
        p->proto = proto;
-       p->state = xnmalloc(proto->proto_statesz);
+       p->state = kmalloc(proto->proto_statesz, GFP_KERNEL);
        if (p->state == NULL)
                return -ENOMEM;
 
        ret = proto->proto_ops.socket(p, user_info);
        if (ret)
-               xnfree(p->state);
+               kfree(p->state);
 
        return ret;
 }
@@ -180,7 +180,7 @@ static int rtipc_close(struct rtdm_dev_context *context,
        if (ret)
                return ret;
 
-       xnfree(p->state);
+       kfree(p->state);
 
        return 0;
 }
@@ -232,10 +232,8 @@ static struct rtdm_device device = {
        .device_name    =       "rtipc",
        .protocol_family=       PF_RTIPC,
        .socket_type    =       SOCK_DGRAM,
-       .socket_rt      =       rtipc_socket,
        .socket_nrt     =       rtipc_socket,
        .ops = {
-               .close_rt       =       NULL,
                .close_nrt      =       rtipc_close,
                .recvmsg_rt     =       rtipc_recvmsg,
                .recvmsg_nrt    =       NULL,
-- 
1.6.0.2


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

Reply via email to