mini/ec_mini.c
branchkernel2.6
changeset 33 f4171b8aadf8
parent 28 801dc7eabf51
child 36 6e9de6fbf74c
--- a/mini/ec_mini.c	Fri Dec 16 09:44:54 2005 +0000
+++ b/mini/ec_mini.c	Fri Dec 16 12:04:59 2005 +0000
@@ -230,9 +230,9 @@
 {
   printk(KERN_INFO "=== Starting Minimal EtherCAT environment... ===\n");
 
-  if ((ecat_master = EtherCAT_master(0)) == NULL)
+  if ((ecat_master = EtherCAT_request(0)) == NULL)
   {
-    printk(KERN_ERR "No EtherCAT master available!\n");
+    printk(KERN_ERR "EtherCAT master 0 not available!\n");
     return -1;
   }
 
@@ -290,6 +290,8 @@
 
       printk(KERN_INFO "Deactivating slaves.\n");
       EtherCAT_deactivate_all_slaves(ecat_master);
+
+      EtherCAT_release(ecat_master);
     }
 
     printk(KERN_INFO "=== Minimal EtherCAT environment stopped. ===\n");