equal
deleted
inserted
replaced
53 void __exit ec_cleanup_module(void); |
53 void __exit ec_cleanup_module(void); |
54 |
54 |
55 /*****************************************************************************/ |
55 /*****************************************************************************/ |
56 |
56 |
57 static int ec_master_count = 1; /**< parameter value, number of masters */ |
57 static int ec_master_count = 1; /**< parameter value, number of masters */ |
58 static int ec_eoeif_count = 0; /**< parameter value, number of EoE interf. */ |
|
59 static struct list_head ec_masters; /**< list of masters */ |
58 static struct list_head ec_masters; /**< list of masters */ |
60 static dev_t device_number; /**< XML character device number */ |
59 static dev_t device_number; /**< XML character device number */ |
61 ec_xmldev_t xmldev; /**< XML character device */ |
60 ec_xmldev_t xmldev; /**< XML character device */ |
62 |
61 |
63 char *ec_master_version_str = EC_MASTER_VERSION; |
62 char *ec_master_version_str = EC_MASTER_VERSION; |
65 /*****************************************************************************/ |
64 /*****************************************************************************/ |
66 |
65 |
67 /** \cond */ |
66 /** \cond */ |
68 |
67 |
69 module_param(ec_master_count, int, S_IRUGO); |
68 module_param(ec_master_count, int, S_IRUGO); |
70 module_param(ec_eoeif_count, int, S_IRUGO); |
|
71 |
69 |
72 MODULE_AUTHOR("Florian Pose <fp@igh-essen.com>"); |
70 MODULE_AUTHOR("Florian Pose <fp@igh-essen.com>"); |
73 MODULE_DESCRIPTION("EtherCAT master driver module"); |
71 MODULE_DESCRIPTION("EtherCAT master driver module"); |
74 MODULE_LICENSE("GPL"); |
72 MODULE_LICENSE("GPL"); |
75 MODULE_VERSION(EC_MASTER_VERSION); |
73 MODULE_VERSION(EC_MASTER_VERSION); |
76 MODULE_PARM_DESC(ec_master_count, "number of EtherCAT masters to initialize"); |
74 MODULE_PARM_DESC(ec_master_count, "number of EtherCAT masters to initialize"); |
77 MODULE_PARM_DESC(ec_eoeif_count, "number of EoE interfaces per master"); |
|
78 |
75 |
79 /** \endcond */ |
76 /** \endcond */ |
80 |
77 |
81 /*****************************************************************************/ |
78 /*****************************************************************************/ |
82 |
79 |
112 (ec_master_t *) kmalloc(sizeof(ec_master_t), GFP_KERNEL))) { |
109 (ec_master_t *) kmalloc(sizeof(ec_master_t), GFP_KERNEL))) { |
113 EC_ERR("Failed to allocate memory for EtherCAT master %i.\n", i); |
110 EC_ERR("Failed to allocate memory for EtherCAT master %i.\n", i); |
114 goto out_free; |
111 goto out_free; |
115 } |
112 } |
116 |
113 |
117 if (ec_master_init(master, i, ec_eoeif_count)) |
114 if (ec_master_init(master, i, 0)) |
118 goto out_free; |
115 goto out_free; |
119 |
116 |
120 list_add_tail(&master->list, &ec_masters); |
117 list_add_tail(&master->list, &ec_masters); |
121 } |
118 } |
122 |
119 |