equal
deleted
inserted
replaced
45 */ |
45 */ |
46 void ec_pdo_init( |
46 void ec_pdo_init( |
47 ec_pdo_t *pdo /**< EtherCAT PDO */ |
47 ec_pdo_t *pdo /**< EtherCAT PDO */ |
48 ) |
48 ) |
49 { |
49 { |
50 pdo->sync_index = -1; // not assigned |
50 pdo->sync_index = -1; // not assigned |
51 pdo->name = NULL; |
51 pdo->name = NULL; |
52 INIT_LIST_HEAD(&pdo->entries); |
52 INIT_LIST_HEAD(&pdo->entries); |
53 } |
53 } |
54 |
54 |
55 /*****************************************************************************/ |
55 /*****************************************************************************/ |
129 { |
129 { |
130 unsigned int len; |
130 unsigned int len; |
131 |
131 |
132 if (pdo->name && name && !strcmp(pdo->name, name)) |
132 if (pdo->name && name && !strcmp(pdo->name, name)) |
133 return 0; |
133 return 0; |
134 |
134 |
135 if (pdo->name) |
135 if (pdo->name) |
136 kfree(pdo->name); |
136 kfree(pdo->name); |
137 |
137 |
138 if (name && (len = strlen(name))) { |
138 if (name && (len = strlen(name))) { |
139 if (!(pdo->name = (char *) kmalloc(len + 1, GFP_KERNEL))) { |
139 if (!(pdo->name = (char *) kmalloc(len + 1, GFP_KERNEL))) { |