equal
deleted
inserted
replaced
21 #include <linux/module.h> |
21 #include <linux/module.h> |
22 #include <linux/kernel.h> |
22 #include <linux/kernel.h> |
23 #include <linux/init.h> |
23 #include <linux/init.h> |
24 |
24 |
25 #include "ec_module.h" |
25 #include "ec_module.h" |
|
26 |
|
27 int __init ecat_init_module(void); |
|
28 void __exit ecat_cleanup_module(void); |
26 |
29 |
27 /*****************************************************************************/ |
30 /*****************************************************************************/ |
28 |
31 |
29 #define LIT(X) #X |
32 #define LIT(X) #X |
30 #define STR(X) LIT(X) |
33 #define STR(X) LIT(X) |
225 } |
228 } |
226 |
229 |
227 if (!try_module_get(ecat_masters[index].dev->module)) { |
230 if (!try_module_get(ecat_masters[index].dev->module)) { |
228 printk(KERN_ERR "EtherCAT: Could not reserve device module!\n"); |
231 printk(KERN_ERR "EtherCAT: Could not reserve device module!\n"); |
229 return NULL; |
232 return NULL; |
|
233 } |
|
234 |
|
235 if (EtherCAT_scan_for_slaves(&ecat_masters[index]) != 0) { |
|
236 printk(KERN_ERR "EtherCAT: Could not scan for slaves!\n"); |
|
237 return NULL; |
230 } |
238 } |
231 |
239 |
232 ecat_masters_reserved[index] = 1; |
240 ecat_masters_reserved[index] = 1; |
233 |
241 |
234 printk(KERN_INFO "EtherCAT: Reserved master %i.\n", index); |
242 printk(KERN_INFO "EtherCAT: Reserved master %i.\n", index); |