Module: xenomai-3
Branch: wip/dovetail
Commit: c58299dd82a52d6a144dc3585bfa990a4966dddd
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=c58299dd82a52d6a144dc3585bfa990a4966dddd

Author: Philippe Gerum <r...@xenomai.org>
Date:   Tue May  3 10:06:11 2016 +0200

cobalt/rtdm: reinit driver magic after unregistration

Failing to do so would prevent the driver to be properly registered
again.

---

 kernel/cobalt/rtdm/device.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/kernel/cobalt/rtdm/device.c b/kernel/cobalt/rtdm/device.c
index 46b7965..aa62169 100644
--- a/kernel/cobalt/rtdm/device.c
+++ b/kernel/cobalt/rtdm/device.c
@@ -325,7 +325,9 @@ static void unregister_driver(struct rtdm_driver *drv)
        XENO_BUG_ON(COBALT, drv->profile_info.magic != RTDM_CLASS_MAGIC);
 
        cobalt_remove_state_chain(&drv->nb_statechange);
-       
+
+       drv->profile_info.magic = ~RTDM_CLASS_MAGIC;
+
        if (drv->device_flags & RTDM_NAMED_DEVICE) {
                cdev_del(&drv->named.cdev);
                unregister_chrdev_region(MKDEV(drv->named.major, 0),


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

Reply via email to