Renamed ec_sii_pdo_t and ec_sii_pdo_entry_t to ec_pdo_t and
authorFlorian Pose <fp@igh-essen.com>
Wed, 07 Mar 2007 11:18:34 +0000
changeset 625 ec69acbbd156
parent 624 11332ad89f47
child 626 a5e838c30733
Renamed ec_sii_pdo_t and ec_sii_pdo_entry_t to ec_pdo_t and
ec_pdo_entry_t, respectively.
master/domain.c
master/slave.c
master/slave.h
--- a/master/domain.c	Wed Mar 07 11:11:17 2007 +0000
+++ b/master/domain.c	Wed Mar 07 11:18:34 2007 +0000
@@ -188,8 +188,8 @@
 
 int ec_domain_reg_pdo_entry(ec_domain_t *domain, /**< EtherCAT domain */
                             ec_slave_t *slave, /**< slave */
-                            const ec_sii_pdo_t *pdo, /**< PDO */
-                            const ec_sii_pdo_entry_t *entry,
+                            const ec_pdo_t *pdo, /**< PDO */
+                            const ec_pdo_entry_t *entry,
                             /**< PDO registration entry */
                             void **data_ptr /**< pointer to the process data
                                                pointer */
@@ -197,8 +197,8 @@
 {
     ec_data_reg_t *data_reg;
     const ec_sii_sync_t *sync;
-    const ec_sii_pdo_t *other_pdo;
-    const ec_sii_pdo_entry_t *other_entry;
+    const ec_pdo_t *other_pdo;
+    const ec_pdo_entry_t *other_entry;
     unsigned int bit_offset, byte_offset;
 
     // Find sync manager for PDO
@@ -499,8 +499,8 @@
 {
     ec_slave_t *slave;
     ec_master_t *master;
-    const ec_sii_pdo_t *pdo;
-    const ec_sii_pdo_entry_t *entry;
+    const ec_pdo_t *pdo;
+    const ec_pdo_entry_t *entry;
 
     master = domain->master;
 
--- a/master/slave.c	Wed Mar 07 11:11:17 2007 +0000
+++ b/master/slave.c	Wed Mar 07 11:18:34 2007 +0000
@@ -241,8 +241,8 @@
 void ec_slave_clear(struct kobject *kobj /**< kobject of the slave */)
 {
     ec_slave_t *slave;
-    ec_sii_pdo_t *pdo, *next_pdo;
-    ec_sii_pdo_entry_t *entry, *next_ent;
+    ec_pdo_t *pdo, *next_pdo;
+    ec_pdo_entry_t *entry, *next_ent;
     ec_sdo_data_t *sdodata, *next_sdodata;
     unsigned int i;
 
@@ -519,16 +519,15 @@
         ec_slave_t *slave, /**< EtherCAT slave */
         const uint8_t *data, /**< category data */
         size_t word_count, /**< number of words */
-        ec_sii_pdo_type_t pdo_type /**< PDO type */
+        ec_pdo_type_t pdo_type /**< PDO type */
         )
 {
-    ec_sii_pdo_t *pdo;
-    ec_sii_pdo_entry_t *entry;
+    ec_pdo_t *pdo;
+    ec_pdo_entry_t *entry;
     unsigned int entry_count, i;
 
     while (word_count >= 4) {
-        if (!(pdo = (ec_sii_pdo_t *)
-              kmalloc(sizeof(ec_sii_pdo_t), GFP_ATOMIC))) {
+        if (!(pdo = kmalloc(sizeof(ec_pdo_t), GFP_KERNEL))) {
             EC_ERR("Failed to allocate PDO memory.\n");
             return -1;
         }
@@ -547,8 +546,7 @@
         data += 8;
 
         for (i = 0; i < entry_count; i++) {
-            if (!(entry = (ec_sii_pdo_entry_t *)
-                  kmalloc(sizeof(ec_sii_pdo_entry_t), GFP_ATOMIC))) {
+            if (!(entry = kmalloc(sizeof(ec_pdo_entry_t), GFP_KERNEL))) {
                 EC_ERR("Failed to allocate PDO entry memory.\n");
                 return -1;
             }
@@ -657,8 +655,8 @@
 {
     off_t off = 0;
     ec_sii_sync_t *sync;
-    ec_sii_pdo_t *pdo;
-    ec_sii_pdo_entry_t *pdo_entry;
+    ec_pdo_t *pdo;
+    ec_pdo_entry_t *pdo_entry;
     int first, i;
     ec_sdo_data_t *sdodata;
     char str[20];
@@ -1073,8 +1071,8 @@
                                  /**< sync manager */
                                  )
 {
-    ec_sii_pdo_t *pdo;
-    ec_sii_pdo_entry_t *pdo_entry;
+    ec_pdo_t *pdo;
+    ec_pdo_entry_t *pdo_entry;
     unsigned int bit_size, byte_size;
 
     if (sync->length) return sync->length;
--- a/master/slave.h	Wed Mar 07 11:11:17 2007 +0000
+++ b/master/slave.h	Wed Mar 07 11:18:34 2007 +0000
@@ -124,29 +124,29 @@
     EC_RX_PDO, /**< Reveive PDO */
     EC_TX_PDO /**< Transmit PDO */
 }
-ec_sii_pdo_type_t;
-
-/*****************************************************************************/
-
-/**
-   PDO description (EEPROM).
+ec_pdo_type_t;
+
+/*****************************************************************************/
+
+/**
+   PDO description.
 */
 
 typedef struct
 {
     struct list_head list; /**< list item */
-    ec_sii_pdo_type_t type; /**< PDO type */
+    ec_pdo_type_t type; /**< PDO type */
     uint16_t index; /**< PDO index */
     uint8_t sync_index; /**< assigned sync manager */
     char *name; /**< PDO name */
     struct list_head entries; /**< entry list */
 }
-ec_sii_pdo_t;
-
-/*****************************************************************************/
-
-/**
-   PDO entry description (EEPROM).
+ec_pdo_t;
+
+/*****************************************************************************/
+
+/**
+   PDO entry description.
 */
 
 typedef struct
@@ -157,7 +157,7 @@
     char *name; /**< entry name */
     uint8_t bit_length; /**< entry length in bit */
 }
-ec_sii_pdo_entry_t;
+ec_pdo_entry_t;
 
 /*****************************************************************************/
 
@@ -267,7 +267,7 @@
 void ec_slave_fetch_sii_general(ec_slave_t *, const uint8_t *);
 int ec_slave_fetch_sii_syncs(ec_slave_t *, const uint8_t *, size_t);
 int ec_slave_fetch_sii_pdos(ec_slave_t *, const uint8_t *, size_t,
-        ec_sii_pdo_type_t);
+        ec_pdo_type_t);
 
 // misc.
 ec_sii_sync_t *ec_slave_get_pdo_sync(ec_slave_t *, ec_direction_t);