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

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 4eafec6..8bae135 100644
--- a/include/cobalt/nucleus/shadow.h
+++ b/include/cobalt/nucleus/shadow.h
@@ -47,7 +47,6 @@ struct xnskin_props {
        void *(*eventcb)(int, void *);
        struct xnsysent *systab;
        struct xntbase **timebasep;
-       struct module *module;
 };
 
 int xnshadow_mount(void);
diff --git a/kernel/cobalt/native/syscall.c b/kernel/cobalt/native/syscall.c
index d4396c7..70a9404 100644
--- a/kernel/cobalt/native/syscall.c
+++ b/kernel/cobalt/native/syscall.c
@@ -2680,7 +2680,6 @@ static struct xnskin_props __props = {
        .systab = __systab,
        .eventcb = &__shadow_eventcb,
        .timebasep = &__native_tbase,
-       .module = THIS_MODULE
 };
 
 int __native_syscall_init(void)
diff --git a/kernel/cobalt/nucleus/shadow.c b/kernel/cobalt/nucleus/shadow.c
index 579bb8e..6dc12bf 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;
@@ -1931,7 +1916,6 @@ static struct xnskin_props __props = {
        .systab = __systab,
        .eventcb = xnshadow_sys_event,
        .timebasep = NULL,
-       .module = NULL
 };
 
 static inline int
diff --git a/kernel/cobalt/rtdm/syscall.c b/kernel/cobalt/rtdm/syscall.c
index 42e6089..0da848d 100644
--- a/kernel/cobalt/rtdm/syscall.c
+++ b/kernel/cobalt/rtdm/syscall.c
@@ -153,7 +153,6 @@ static struct xnskin_props __props = {
        .systab = __systab,
        .eventcb = &rtdm_skin_callback,
        .timebasep = NULL,
-       .module = THIS_MODULE
 };
 
 int __init rtdm_syscall_init(void)
diff --git a/kernel/cobalt/syscall.c b/kernel/cobalt/syscall.c
index 9574eeb..8960ccf 100644
--- a/kernel/cobalt/syscall.c
+++ b/kernel/cobalt/syscall.c
@@ -2715,7 +2715,6 @@ static struct xnskin_props __props = {
        .systab = __systab,
        .eventcb = &cobalt_eventcb,
        .timebasep = &cobalt_tbase,
-       .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