equal
deleted
inserted
replaced
246 |
246 |
247 void ec_master_clear(struct kobject *kobj /**< kobject of the master */) |
247 void ec_master_clear(struct kobject *kobj /**< kobject of the master */) |
248 { |
248 { |
249 ec_master_t *master = container_of(kobj, ec_master_t, kobj); |
249 ec_master_t *master = container_of(kobj, ec_master_t, kobj); |
250 ec_eoe_t *eoe, *next_eoe; |
250 ec_eoe_t *eoe, *next_eoe; |
251 ec_datagram_t *datagram, *next_c; |
251 ec_datagram_t *datagram, *next_datagram; |
252 |
252 |
253 // empty datagram queue |
253 // dequeue all datagrams |
254 list_for_each_entry_safe(datagram, next_c, |
254 list_for_each_entry_safe(datagram, next_datagram, |
255 &master->datagram_queue, queue) { |
255 &master->datagram_queue, queue) { |
256 datagram->state = EC_DATAGRAM_ERROR; |
256 datagram->state = EC_DATAGRAM_ERROR; |
257 list_del_init(&datagram->queue); |
257 list_del_init(&datagram->queue); |
258 } |
258 } |
259 |
259 |