Use ec_datagram_zero() wherever possible.
authorFlorian Pose <fp@igh-essen.com>
Thu, 15 Apr 2010 20:15:48 +0200
changeset 1896 1d4bca6ba543
parent 1895 55977bffc43a
child 1897 029345a0de52
Use ec_datagram_zero() wherever possible.
TODO
master/fsm_slave_config.c
--- a/TODO	Thu Apr 15 20:09:07 2010 +0200
+++ b/TODO	Thu Apr 15 20:15:48 2010 +0200
@@ -13,7 +13,6 @@
 * Ethernet drivers:
     - Fix link detection in generic driver.
     - Add native drivers from 2.6.24 up to 2.6.31.
-* Use ec_datagram_zero() wherever possible.
 * Finish library implementation.
 * Rescan command.
 * Document ec_fsm_foe members.
--- a/master/fsm_slave_config.c	Thu Apr 15 20:09:07 2010 +0200
+++ b/master/fsm_slave_config.c	Thu Apr 15 20:15:48 2010 +0200
@@ -316,7 +316,7 @@
 
     // clear sync manager configurations
     ec_datagram_fpwr(datagram, slave->station_address, 0x0800, sync_size);
-    memset(datagram->data, 0x00, sync_size);
+    ec_datagram_zero(datagram);
     fsm->retries = EC_FSM_RETRIES;
     fsm->state = ec_fsm_slave_config_state_clear_sync;
 }
@@ -630,7 +630,7 @@
 
         ec_datagram_fpwr(datagram, slave->station_address, 0x0800,
                 EC_SYNC_PAGE_SIZE * 2);
-        memset(datagram->data, 0x00, EC_SYNC_PAGE_SIZE * 2);
+        ec_datagram_zero(datagram);
 
         ec_sync_init(&sync, slave);
         sync.physical_start_address = slave->sii.boot_rx_mailbox_offset;