Removed XML device from master structure.
--- a/master/master.c Fri Feb 16 09:52:39 2007 +0000
+++ b/master/master.c Fri Feb 16 13:23:57 2007 +0000
@@ -102,8 +102,7 @@
int ec_master_init(ec_master_t *master, /**< EtherCAT master */
unsigned int index, /**< master index */
- unsigned int eoeif_count, /**< number of EoE interfaces */
- dev_t dev_num /**< number for XML cdev's */
+ unsigned int eoeif_count /**< number of EoE interfaces */
)
{
ec_eoe_t *eoe, *next_eoe;
@@ -164,12 +163,6 @@
master->sdo_timer.data = (unsigned long) master;
init_completion(&master->sdo_complete);
- // init XML character device
- if (ec_xmldev_init(&master->xmldev, master, dev_num)) {
- EC_ERR("Failed to init XML character device.\n");
- goto out_return;
- }
-
// create EoE handlers
for (i = 0; i < eoeif_count; i++) {
if (!(eoe = (ec_eoe_t *) kmalloc(sizeof(ec_eoe_t), GFP_KERNEL))) {
@@ -216,8 +209,6 @@
ec_eoe_clear(eoe);
kfree(eoe);
}
- ec_xmldev_clear(&master->xmldev);
-out_return:
return -1;
}
@@ -261,7 +252,6 @@
ec_fsm_master_clear(&master->fsm);
ec_datagram_clear(&master->fsm_datagram);
- ec_xmldev_clear(&master->xmldev);
// clear EoE objects
list_for_each_entry_safe(eoe, next_eoe, &master->eoe_handlers, list) {
--- a/master/master.h Fri Feb 16 09:52:39 2007 +0000
+++ b/master/master.h Fri Feb 16 13:23:57 2007 +0000
@@ -49,7 +49,6 @@
#include "device.h"
#include "domain.h"
-#include "xmldev.h"
#include "fsm_master.h"
/*****************************************************************************/
@@ -102,8 +101,6 @@
ec_device_t *device; /**< EtherCAT device */
struct semaphore device_sem; /**< device semaphore */
- ec_xmldev_t xmldev; /**< XML character device */
-
ec_fsm_master_t fsm; /**< master state machine */
ec_datagram_t fsm_datagram; /**< datagram used for state machines */
ec_master_mode_t mode; /**< master mode */
@@ -150,7 +147,7 @@
/*****************************************************************************/
// master creation/deletion
-int ec_master_init(ec_master_t *, unsigned int, unsigned int, dev_t);
+int ec_master_init(ec_master_t *, unsigned int, unsigned int);
void ec_master_destroy(ec_master_t *);
// mode transitions
--- a/master/module.c Fri Feb 16 09:52:39 2007 +0000
+++ b/master/module.c Fri Feb 16 13:23:57 2007 +0000
@@ -45,6 +45,7 @@
#include "globals.h"
#include "master.h"
#include "device.h"
+#include "xmldev.h"
/*****************************************************************************/
@@ -56,7 +57,8 @@
static int ec_master_count = 1; /**< parameter value, number of masters */
static int ec_eoeif_count = 0; /**< parameter value, number of EoE interf. */
static struct list_head ec_masters; /**< list of masters */
-static dev_t device_number;
+static dev_t device_number; /**< XML character device number */
+ec_xmldev_t xmldev; /**< XML character device */
char *ec_master_version_str = EC_MASTER_VERSION;
@@ -112,7 +114,7 @@
goto out_free;
}
- if (ec_master_init(master, i, ec_eoeif_count, device_number))
+ if (ec_master_init(master, i, ec_eoeif_count))
goto out_free;
list_add_tail(&master->list, &ec_masters);