Module: xenomai-gch
Branch: for-forge
Commit: 98374c6c951418d84c6f583be105b9ca214171e6
URL:    
http://git.xenomai.org/?p=xenomai-gch.git;a=commit;h=98374c6c951418d84c6f583be105b9ca214171e6

Author: Gilles Chanteperdrix <gilles.chanteperd...@xenomai.org>
Date:   Fri Nov 11 01:58:42 2011 +0100

nucleus: remove calls to module_get/module_put

skins no longer are modules

---

 include/cobalt/nucleus/shadow.h |    1 -
 kernel/cobalt/native/syscall.c  |    1 -
 kernel/cobalt/nucleus/shadow.c  |   16 ----------------
 kernel/cobalt/rtdm/syscall.c    |    1 -
 kernel/cobalt/syscall.c         |    1 -
 5 files changed, 0 insertions(+), 20 deletions(-)

diff --git a/include/cobalt/nucleus/shadow.h b/include/cobalt/nucleus/shadow.h
index 1e65d3d..fb72be7 100644
--- a/include/cobalt/nucleus/shadow.h
+++ b/include/cobalt/nucleus/shadow.h
@@ -45,7 +45,6 @@ struct xnskin_props {
        int nrcalls;
        void *(*eventcb)(int, void *);
        struct xnsysent *systab;
-       struct module *module;
 };
 
 int xnshadow_mount(void);
diff --git a/kernel/cobalt/native/syscall.c b/kernel/cobalt/native/syscall.c
index d85d0cb..57ef6bf 100644
--- a/kernel/cobalt/native/syscall.c
+++ b/kernel/cobalt/native/syscall.c
@@ -2668,7 +2668,6 @@ static struct xnskin_props __props = {
        .nrcalls = sizeof(__systab) / sizeof(__systab[0]),
        .systab = __systab,
        .eventcb = &__shadow_eventcb,
-       .module = THIS_MODULE
 };
 
 int __native_syscall_init(void)
diff --git a/kernel/cobalt/nucleus/shadow.c b/kernel/cobalt/nucleus/shadow.c
index 2763592..c28c845 100644
--- a/kernel/cobalt/nucleus/shadow.c
+++ b/kernel/cobalt/nucleus/shadow.c
@@ -277,8 +277,6 @@ static void detach_ppd(xnshadow_ppd_t * ppd)
 {
        unsigned int muxid = xnshadow_ppd_muxid(ppd);
        skins[muxid].props->eventcb(XNSHADOW_CLIENT_DETACH, ppd);
-       if (skins[muxid].props->module)
-               module_put(skins[muxid].props->module);
 }
 
 struct xnvdso *nkvdso;
@@ -347,8 +345,6 @@ static void xnshadow_dereference_skin(unsigned magic)
                sslt = skins + muxid;
                if (sslt->props && sslt->props->magic == magic) {
                        xnarch_atomic_dec(&sslt->refcnt);
-                       if (sslt->props->module)
-                               module_put(sslt->props->module);
                        break;
                }
        }
@@ -1000,9 +996,6 @@ int xnshadow_map(xnthread_t *thread, xncompletion_t __user 
*u_completion,
        for (muxid = 0; muxid < XENOMAI_SKINS_NR; muxid++) {
                sslt = skins + muxid;
                if (sslt->props && sslt->props->magic == magic) {
-                       if (sslt->props->module
-                           && !try_module_get(sslt->props->module))
-                               return -ENOSYS;
                        xnarch_atomic_inc(&sslt->refcnt);
                        break;
                }
@@ -1490,12 +1483,6 @@ muxid_eventcb:
                 */
                sslt->props->eventcb(XNSHADOW_CLIENT_DETACH, ppd);
                ppd = NULL;
-               goto eventcb_done;
-       }
-
-       if (sslt->props->module && !try_module_get(sslt->props->module)) {
-               err = -ESRCH;
-               goto fail;
        }
 
 eventcb_done:
@@ -1507,8 +1494,6 @@ eventcb_done:
                if (sslt->props->eventcb && ppd) {
                        ppd_remove(ppd);
                        sslt->props->eventcb(XNSHADOW_CLIENT_DETACH, ppd);
-                       if (sslt->props->module)
-                               module_put(sslt->props->module);
                }
 
                err = -ENOSYS;
@@ -1918,7 +1903,6 @@ static struct xnskin_props __props = {
        .nrcalls = sizeof(__systab) / sizeof(__systab[0]),
        .systab = __systab,
        .eventcb = xnshadow_sys_event,
-       .module = NULL
 };
 
 static inline int
diff --git a/kernel/cobalt/rtdm/syscall.c b/kernel/cobalt/rtdm/syscall.c
index 2f92313..12f769c 100644
--- a/kernel/cobalt/rtdm/syscall.c
+++ b/kernel/cobalt/rtdm/syscall.c
@@ -152,7 +152,6 @@ static struct xnskin_props __props = {
        .nrcalls = sizeof(__systab) / sizeof(__systab[0]),
        .systab = __systab,
        .eventcb = &rtdm_skin_callback,
-       .module = THIS_MODULE
 };
 
 int __init rtdm_syscall_init(void)
diff --git a/kernel/cobalt/syscall.c b/kernel/cobalt/syscall.c
index f9398cf..74c9971 100644
--- a/kernel/cobalt/syscall.c
+++ b/kernel/cobalt/syscall.c
@@ -2712,7 +2712,6 @@ static struct xnskin_props __props = {
        .nrcalls = sizeof(__systab) / sizeof(__systab[0]),
        .systab = __systab,
        .eventcb = &cobalt_eventcb,
-       .module = THIS_MODULE
 };
 
 int cobalt_syscall_init(void)


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

Reply via email to