Module: xenomai-3
Branch: stable-3.0.x
Commit: 7fa3633957cee1a7d1cc8b2704858992e9c49821
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=7fa3633957cee1a7d1cc8b2704858992e9c49821

Author: Jan Kiszka <jan.kis...@siemens.com>
Date:   Fri May 27 11:35:26 2016 +0200

cobalt/rtdm: Also initialized driver refcount for protocol devices

Was only done for named devices, thus leaving protocol devices in limbo
state after rtdm_dev_unregister.

Signed-off-by: Jan Kiszka <jan.kis...@siemens.com>

---

 kernel/cobalt/rtdm/device.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/cobalt/rtdm/device.c b/kernel/cobalt/rtdm/device.c
index 8c54890..3e6a46b 100644
--- a/kernel/cobalt/rtdm/device.c
+++ b/kernel/cobalt/rtdm/device.c
@@ -303,10 +303,10 @@ static int register_driver(struct rtdm_driver *drv)
                goto fail_cdev;
 
        drv->named.major = MAJOR(rdev);
-       atomic_set(&drv->refcount, 1);
        bitmap_zero(drv->minor_map, RTDM_MAX_MINOR);
 
 done:
+       atomic_set(&drv->refcount, 1);
        drv->nb_statechange.notifier_call = state_change_notifier;
        drv->nb_statechange.priority = 0;
        cobalt_add_state_chain(&drv->nb_statechange);


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

Reply via email to