Removed unwanted tabulators.
authorFlorian Pose <fp@igh-essen.com>
Mon, 27 Jul 2009 10:37:47 +0000
changeset 1507 68e89abadd19
parent 1506 41ca84fb6bb2
child 1508 60a116ed3897
Removed unwanted tabulators.
master/cdev.c
master/datagram.c
master/device.c
master/fsm_coe.c
master/fsm_master.c
master/fsm_pdo.c
master/fsm_sii.c
master/fsm_slave_config.c
master/ioctl.h
master/master.c
master/slave.c
master/slave_config.c
master/slave_config.h
master/voe_handler.c
--- a/master/cdev.c	Thu Jul 16 07:52:17 2009 +0000
+++ b/master/cdev.c	Mon Jul 27 10:37:47 2009 +0000
@@ -108,10 +108,10 @@
  * \return 0 in case of success, else < 0
  */
 int ec_cdev_init(
-		ec_cdev_t *cdev, /**< EtherCAT master character device. */
-		ec_master_t *master, /**< Parent master. */
-		dev_t dev_num /**< Device number. */
-		)
+        ec_cdev_t *cdev, /**< EtherCAT master character device. */
+        ec_master_t *master, /**< Parent master. */
+        dev_t dev_num /**< Device number. */
+        )
 {
     int ret;
 
@@ -121,9 +121,9 @@
     cdev->cdev.owner = THIS_MODULE;
 
     ret = cdev_add(&cdev->cdev,
-		 MKDEV(MAJOR(dev_num), master->index), 1);
+            MKDEV(MAJOR(dev_num), master->index), 1);
     if (ret) {
-		EC_ERR("Failed to add character device!\n");
+        EC_ERR("Failed to add character device!\n");
     }
 
     return ret;
@@ -1449,7 +1449,7 @@
         )
 {
     ec_ioctl_eoe_handler_t data;
-	const ec_eoe_t *eoe;
+    const ec_eoe_t *eoe;
 
     if (copy_from_user(&data, (void __user *) arg, sizeof(data))) {
         return -EFAULT;
@@ -1464,12 +1464,12 @@
         return -EINVAL;
     }
 
-	if (eoe->slave) {
-		data.slave_position = eoe->slave->ring_position;
-	} else {
-		data.slave_position = 0xffff;
-	}
-	snprintf(data.name, EC_DATAGRAM_NAME_SIZE, eoe->dev->name);
+    if (eoe->slave) {
+        data.slave_position = eoe->slave->ring_position;
+    } else {
+        data.slave_position = 0xffff;
+    }
+    snprintf(data.name, EC_DATAGRAM_NAME_SIZE, eoe->dev->name);
     data.open = eoe->opened;
     data.rx_bytes = eoe->stats.tx_bytes;
     data.rx_rate = eoe->tx_rate;
@@ -1496,7 +1496,7 @@
         ec_cdev_priv_t *priv /**< Private data structure of file handle. */
         )
 {
-	ec_master_t *m;
+    ec_master_t *m;
     int ret = 0;
 
     m = ecrt_request_master_err(master->index);
@@ -1521,8 +1521,8 @@
 {
     ec_domain_t *domain;
 
-	if (unlikely(!priv->requested))
-		return -EPERM;
+    if (unlikely(!priv->requested))
+        return -EPERM;
 
     domain = ecrt_master_create_domain_err(master);
     if (IS_ERR(domain))
@@ -1544,8 +1544,8 @@
     ec_ioctl_config_t data;
     ec_slave_config_t *sc, *entry;
 
-	if (unlikely(!priv->requested))
-		return -EPERM;
+    if (unlikely(!priv->requested))
+        return -EPERM;
 
     if (copy_from_user(&data, (void __user *) arg, sizeof(data))) {
         return -EFAULT;
@@ -1589,8 +1589,8 @@
     off_t offset;
     int ret;
     
-	if (unlikely(!priv->requested))
-		return -EPERM;
+    if (unlikely(!priv->requested))
+        return -EPERM;
 
     /* Get the sum of the domains' process data sizes. */
     
@@ -1645,8 +1645,8 @@
         ec_cdev_priv_t *priv /**< Private data structure of file handle. */
         )
 {
-	if (unlikely(!priv->requested))
-		return -EPERM;
+    if (unlikely(!priv->requested))
+        return -EPERM;
 
     down(&master->io_sem);
     ecrt_master_send(master);
@@ -1664,8 +1664,8 @@
         ec_cdev_priv_t *priv /**< Private data structure of file handle. */
         )
 {
-	if (unlikely(!priv->requested))
-		return -EPERM;
+    if (unlikely(!priv->requested))
+        return -EPERM;
 
     down(&master->io_sem);
     ecrt_master_receive(master);
@@ -1685,8 +1685,8 @@
 {
     ec_master_state_t data;
     
-	if (unlikely(!priv->requested))
-		return -EPERM;
+    if (unlikely(!priv->requested))
+        return -EPERM;
 
     ecrt_master_state(master, &data);
 
@@ -1708,8 +1708,8 @@
 {
     ec_ioctl_app_time_t data;
     
-	if (unlikely(!priv->requested))
-		return -EPERM;
+    if (unlikely(!priv->requested))
+        return -EPERM;
 
     if (copy_from_user(&data, (void __user *) arg, sizeof(data))) {
         return -EFAULT;
@@ -1729,8 +1729,8 @@
         ec_cdev_priv_t *priv /**< Private data structure of file handle. */
         )
 {
-	if (unlikely(!priv->requested))
-		return -EPERM;
+    if (unlikely(!priv->requested))
+        return -EPERM;
 
     down(&master->io_sem);
     ecrt_master_sync_reference_clock(master);
@@ -1748,8 +1748,8 @@
         ec_cdev_priv_t *priv /**< Private data structure of file handle. */
         )
 {
-	if (unlikely(!priv->requested))
-		return -EPERM;
+    if (unlikely(!priv->requested))
+        return -EPERM;
 
     down(&master->io_sem);
     ecrt_master_sync_slave_clocks(master);
@@ -1772,7 +1772,7 @@
     unsigned int i;
     int ret = 0;
 
-	if (unlikely(!priv->requested)) {
+    if (unlikely(!priv->requested)) {
         ret = -EPERM;
         goto out_return;
     }
@@ -1821,7 +1821,7 @@
     ec_ioctl_config_pdo_t data;
     ec_slave_config_t *sc;
 
-	if (unlikely(!priv->requested))
+    if (unlikely(!priv->requested))
         return -EPERM;
 
     if (copy_from_user(&data, (void __user *) arg, sizeof(data)))
@@ -1853,7 +1853,7 @@
     ec_ioctl_config_pdo_t data;
     ec_slave_config_t *sc;
 
-	if (unlikely(!priv->requested))
+    if (unlikely(!priv->requested))
         return -EPERM;
 
     if (copy_from_user(&data, (void __user *) arg, sizeof(data)))
@@ -1886,7 +1886,7 @@
     ec_ioctl_add_pdo_entry_t data;
     ec_slave_config_t *sc;
 
-	if (unlikely(!priv->requested))
+    if (unlikely(!priv->requested))
         return -EPERM;
 
     if (copy_from_user(&data, (void __user *) arg, sizeof(data)))
@@ -1919,7 +1919,7 @@
     ec_ioctl_config_pdo_t data;
     ec_slave_config_t *sc;
 
-	if (unlikely(!priv->requested))
+    if (unlikely(!priv->requested))
         return -EPERM;
 
     if (copy_from_user(&data, (void __user *) arg, sizeof(data)))
@@ -1954,7 +1954,7 @@
     ec_domain_t *domain;
     int ret;
 
-	if (unlikely(!priv->requested))
+    if (unlikely(!priv->requested))
         return -EPERM;
 
     if (copy_from_user(&data, (void __user *) arg, sizeof(data)))
@@ -1997,7 +1997,7 @@
     ec_ioctl_config_t data;
     ec_slave_config_t *sc;
 
-	if (unlikely(!priv->requested))
+    if (unlikely(!priv->requested))
         return -EPERM;
 
     if (copy_from_user(&data, (void __user *) arg, sizeof(data)))
@@ -2037,7 +2037,7 @@
     uint8_t *sdo_data = NULL;
     int ret;
 
-	if (unlikely(!priv->requested))
+    if (unlikely(!priv->requested))
         return -EPERM;
 
     if (copy_from_user(&data, (void __user *) arg, sizeof(data)))
@@ -2088,8 +2088,8 @@
     ec_slave_config_t *sc;
     ec_sdo_request_t *req;
 
-	if (unlikely(!priv->requested))
-		return -EPERM;
+    if (unlikely(!priv->requested))
+        return -EPERM;
 
     if (copy_from_user(&data, (void __user *) arg, sizeof(data))) {
         return -EFAULT;
@@ -2137,8 +2137,8 @@
     ec_slave_config_t *sc;
     ec_voe_handler_t *voe;
 
-	if (unlikely(!priv->requested))
-		return -EPERM;
+    if (unlikely(!priv->requested))
+        return -EPERM;
 
     if (copy_from_user(&data, (void __user *) arg, sizeof(data))) {
         return -EFAULT;
@@ -2185,8 +2185,8 @@
     const ec_slave_config_t *sc;
     ec_slave_config_state_t state;
     
-	if (unlikely(!priv->requested))
-		return -EPERM;
+    if (unlikely(!priv->requested))
+        return -EPERM;
 
     if (copy_from_user(&data, (void __user *) arg, sizeof(data))) {
         return -EFAULT;
@@ -2223,7 +2223,7 @@
     int offset = 0;
     const ec_domain_t *domain;
 
-	if (unlikely(!priv->requested))
+    if (unlikely(!priv->requested))
         return -EPERM;
 
     if (down_interruptible(&master->master_sem)) {
@@ -2254,7 +2254,7 @@
 {
     ec_domain_t *domain;
 
-	if (unlikely(!priv->requested))
+    if (unlikely(!priv->requested))
         return -EPERM;
 
     if (down_interruptible(&master->master_sem))
@@ -2282,7 +2282,7 @@
 {
     ec_domain_t *domain;
 
-	if (unlikely(!priv->requested))
+    if (unlikely(!priv->requested))
         return -EPERM;
 
     if (down_interruptible(&master->master_sem))
@@ -2312,8 +2312,8 @@
     const ec_domain_t *domain;
     ec_domain_state_t state;
     
-	if (unlikely(!priv->requested))
-		return -EPERM;
+    if (unlikely(!priv->requested))
+        return -EPERM;
 
     if (copy_from_user(&data, (void __user *) arg, sizeof(data))) {
         return -EFAULT;
@@ -2351,7 +2351,7 @@
     ec_slave_config_t *sc;
     ec_sdo_request_t *req;
 
-	if (unlikely(!priv->requested))
+    if (unlikely(!priv->requested))
         return -EPERM;
 
     if (copy_from_user(&data, (void __user *) arg, sizeof(data)))
@@ -2390,7 +2390,7 @@
     ec_slave_config_t *sc;
     ec_sdo_request_t *req;
 
-	if (unlikely(!priv->requested))
+    if (unlikely(!priv->requested))
         return -EPERM;
 
     if (copy_from_user(&data, (void __user *) arg, sizeof(data)))
@@ -2437,7 +2437,7 @@
     ec_slave_config_t *sc;
     ec_sdo_request_t *req;
 
-	if (unlikely(!priv->requested))
+    if (unlikely(!priv->requested))
         return -EPERM;
 
     if (copy_from_user(&data, (void __user *) arg, sizeof(data)))
@@ -2477,7 +2477,7 @@
     ec_sdo_request_t *req;
     int ret;
 
-	if (unlikely(!priv->requested))
+    if (unlikely(!priv->requested))
         return -EPERM;
 
     if (copy_from_user(&data, (void __user *) arg, sizeof(data)))
@@ -2529,7 +2529,7 @@
     ec_slave_config_t *sc;
     ec_sdo_request_t *req;
 
-	if (unlikely(!priv->requested))
+    if (unlikely(!priv->requested))
         return -EPERM;
 
     if (copy_from_user(&data, (void __user *) arg, sizeof(data)))
@@ -2573,7 +2573,7 @@
     uint32_t vendor_id;
     uint16_t vendor_type;
 
-	if (unlikely(!priv->requested))
+    if (unlikely(!priv->requested))
         return -EPERM;
 
     if (copy_from_user(&data, (void __user *) arg, sizeof(data)))
@@ -2620,7 +2620,7 @@
     uint32_t vendor_id;
     uint16_t vendor_type;
 
-	if (unlikely(!priv->requested))
+    if (unlikely(!priv->requested))
         return -EPERM;
 
     if (copy_from_user(&data, (void __user *) arg, sizeof(data)))
@@ -2668,7 +2668,7 @@
     ec_slave_config_t *sc;
     ec_voe_handler_t *voe;
 
-	if (unlikely(!priv->requested))
+    if (unlikely(!priv->requested))
         return -EPERM;
 
     if (copy_from_user(&data, (void __user *) arg, sizeof(data)))
@@ -2707,7 +2707,7 @@
     ec_slave_config_t *sc;
     ec_voe_handler_t *voe;
 
-	if (unlikely(!priv->requested))
+    if (unlikely(!priv->requested))
         return -EPERM;
 
     if (copy_from_user(&data, (void __user *) arg, sizeof(data)))
@@ -2746,7 +2746,7 @@
     ec_slave_config_t *sc;
     ec_voe_handler_t *voe;
 
-	if (unlikely(!priv->requested))
+    if (unlikely(!priv->requested))
         return -EPERM;
 
     if (copy_from_user(&data, (void __user *) arg, sizeof(data)))
@@ -2794,7 +2794,7 @@
     ec_slave_config_t *sc;
     ec_voe_handler_t *voe;
 
-	if (unlikely(!priv->requested))
+    if (unlikely(!priv->requested))
         return -EPERM;
 
     if (copy_from_user(&data, (void __user *) arg, sizeof(data)))
@@ -2841,7 +2841,7 @@
     ec_slave_config_t *sc;
     ec_voe_handler_t *voe;
 
-	if (unlikely(!priv->requested))
+    if (unlikely(!priv->requested))
         return -EPERM;
 
     if (copy_from_user(&data, (void __user *) arg, sizeof(data)))
@@ -2932,10 +2932,10 @@
     data.result = request.req.result;
     data.error_code = request.req.error_code;
 
-	if (master->debug_level) {
-		EC_DBG("Read %d bytes via FoE (result = 0x%x).\n",
-				request.req.data_size, request.req.result);
-	}
+    if (master->debug_level) {
+        EC_DBG("Read %d bytes via FoE (result = 0x%x).\n",
+                request.req.data_size, request.req.result);
+    }
 
     if (request.req.state != EC_INT_REQUEST_SUCCESS) {
         data.data_size = 0;
@@ -3012,9 +3012,9 @@
         return -EINVAL;
     }
 
-	if (master->debug_level) {
-		EC_DBG("Scheduling FoE write request.\n");
-	}
+    if (master->debug_level) {
+        EC_DBG("Scheduling FoE write request.\n");
+    }
 
     // schedule FoE write request.
     list_add_tail(&request.list, &master->foe_requests);
@@ -3050,9 +3050,9 @@
 
     ec_foe_request_clear(&request.req);
 
-	if (master->debug_level) {
-		printk ("Finished FoE writing.\n");
-	}
+    if (master->debug_level) {
+        printk("Finished FoE writing.\n");
+    }
 
     return retval;
 }
@@ -3189,136 +3189,136 @@
             return ec_cdev_ioctl_eoe_handler(master, arg);
         case EC_IOCTL_REQUEST:
             if (!(filp->f_mode & FMODE_WRITE))
-				return -EPERM;
-			return ec_cdev_ioctl_request(master, arg, priv);
+                return -EPERM;
+            return ec_cdev_ioctl_request(master, arg, priv);
         case EC_IOCTL_CREATE_DOMAIN:
             if (!(filp->f_mode & FMODE_WRITE))
-				return -EPERM;
-			return ec_cdev_ioctl_create_domain(master, arg, priv);
+                return -EPERM;
+            return ec_cdev_ioctl_create_domain(master, arg, priv);
         case EC_IOCTL_CREATE_SLAVE_CONFIG:
             if (!(filp->f_mode & FMODE_WRITE))
-				return -EPERM;
-			return ec_cdev_ioctl_create_slave_config(master, arg, priv);
+                return -EPERM;
+            return ec_cdev_ioctl_create_slave_config(master, arg, priv);
         case EC_IOCTL_ACTIVATE:
             if (!(filp->f_mode & FMODE_WRITE))
-				return -EPERM;
-			return ec_cdev_ioctl_activate(master, arg, priv);
+                return -EPERM;
+            return ec_cdev_ioctl_activate(master, arg, priv);
         case EC_IOCTL_SEND:
             if (!(filp->f_mode & FMODE_WRITE))
-				return -EPERM;
-			return ec_cdev_ioctl_send(master, arg, priv);
+                return -EPERM;
+            return ec_cdev_ioctl_send(master, arg, priv);
         case EC_IOCTL_RECEIVE:
             if (!(filp->f_mode & FMODE_WRITE))
-				return -EPERM;
-			return ec_cdev_ioctl_receive(master, arg, priv);
+                return -EPERM;
+            return ec_cdev_ioctl_receive(master, arg, priv);
         case EC_IOCTL_MASTER_STATE:
-			return ec_cdev_ioctl_master_state(master, arg, priv);
+            return ec_cdev_ioctl_master_state(master, arg, priv);
         case EC_IOCTL_APP_TIME:
             if (!(filp->f_mode & FMODE_WRITE))
-				return -EPERM;
-			return ec_cdev_ioctl_app_time(master, arg, priv);
+                return -EPERM;
+            return ec_cdev_ioctl_app_time(master, arg, priv);
         case EC_IOCTL_SYNC_REF:
             if (!(filp->f_mode & FMODE_WRITE))
-				return -EPERM;
-			return ec_cdev_ioctl_sync_ref(master, arg, priv);
+                return -EPERM;
+            return ec_cdev_ioctl_sync_ref(master, arg, priv);
         case EC_IOCTL_SYNC_SLAVES:
             if (!(filp->f_mode & FMODE_WRITE))
-				return -EPERM;
-			return ec_cdev_ioctl_sync_slaves(master, arg, priv);
+                return -EPERM;
+            return ec_cdev_ioctl_sync_slaves(master, arg, priv);
         case EC_IOCTL_SC_SYNC:
             if (!(filp->f_mode & FMODE_WRITE))
-				return -EPERM;
-			return ec_cdev_ioctl_sc_sync(master, arg, priv);
+                return -EPERM;
+            return ec_cdev_ioctl_sc_sync(master, arg, priv);
         case EC_IOCTL_SC_ADD_PDO:
             if (!(filp->f_mode & FMODE_WRITE))
-				return -EPERM;
-			return ec_cdev_ioctl_sc_add_pdo(master, arg, priv);
+                return -EPERM;
+            return ec_cdev_ioctl_sc_add_pdo(master, arg, priv);
         case EC_IOCTL_SC_CLEAR_PDOS:
             if (!(filp->f_mode & FMODE_WRITE))
-				return -EPERM;
-			return ec_cdev_ioctl_sc_clear_pdos(master, arg, priv);
+                return -EPERM;
+            return ec_cdev_ioctl_sc_clear_pdos(master, arg, priv);
         case EC_IOCTL_SC_ADD_ENTRY:
             if (!(filp->f_mode & FMODE_WRITE))
-				return -EPERM;
-			return ec_cdev_ioctl_sc_add_entry(master, arg, priv);
+                return -EPERM;
+            return ec_cdev_ioctl_sc_add_entry(master, arg, priv);
         case EC_IOCTL_SC_CLEAR_ENTRIES:
             if (!(filp->f_mode & FMODE_WRITE))
-				return -EPERM;
-			return ec_cdev_ioctl_sc_clear_entries(master, arg, priv);
+                return -EPERM;
+            return ec_cdev_ioctl_sc_clear_entries(master, arg, priv);
         case EC_IOCTL_SC_REG_PDO_ENTRY:
             if (!(filp->f_mode & FMODE_WRITE))
-				return -EPERM;
-			return ec_cdev_ioctl_sc_reg_pdo_entry(master, arg, priv);
+                return -EPERM;
+            return ec_cdev_ioctl_sc_reg_pdo_entry(master, arg, priv);
         case EC_IOCTL_SC_DC:
             if (!(filp->f_mode & FMODE_WRITE))
-				return -EPERM;
-			return ec_cdev_ioctl_sc_dc(master, arg, priv);
+                return -EPERM;
+            return ec_cdev_ioctl_sc_dc(master, arg, priv);
         case EC_IOCTL_SC_SDO:
             if (!(filp->f_mode & FMODE_WRITE))
-				return -EPERM;
-			return ec_cdev_ioctl_sc_sdo(master, arg, priv);
+                return -EPERM;
+            return ec_cdev_ioctl_sc_sdo(master, arg, priv);
         case EC_IOCTL_SC_SDO_REQUEST:
             if (!(filp->f_mode & FMODE_WRITE))
-				return -EPERM;
-			return ec_cdev_ioctl_sc_create_sdo_request(master, arg, priv);
+                return -EPERM;
+            return ec_cdev_ioctl_sc_create_sdo_request(master, arg, priv);
         case EC_IOCTL_SC_VOE:
             if (!(filp->f_mode & FMODE_WRITE))
-				return -EPERM;
-			return ec_cdev_ioctl_sc_create_voe_handler(master, arg, priv);
+                return -EPERM;
+            return ec_cdev_ioctl_sc_create_voe_handler(master, arg, priv);
         case EC_IOCTL_SC_STATE:
-			return ec_cdev_ioctl_sc_state(master, arg, priv);
+            return ec_cdev_ioctl_sc_state(master, arg, priv);
         case EC_IOCTL_DOMAIN_OFFSET:
-			return ec_cdev_ioctl_domain_offset(master, arg, priv);
+            return ec_cdev_ioctl_domain_offset(master, arg, priv);
         case EC_IOCTL_DOMAIN_PROCESS:
             if (!(filp->f_mode & FMODE_WRITE))
-				return -EPERM;
-			return ec_cdev_ioctl_domain_process(master, arg, priv);
+                return -EPERM;
+            return ec_cdev_ioctl_domain_process(master, arg, priv);
         case EC_IOCTL_DOMAIN_QUEUE:
             if (!(filp->f_mode & FMODE_WRITE))
-				return -EPERM;
-			return ec_cdev_ioctl_domain_queue(master, arg, priv);
+                return -EPERM;
+            return ec_cdev_ioctl_domain_queue(master, arg, priv);
         case EC_IOCTL_DOMAIN_STATE:
-			return ec_cdev_ioctl_domain_state(master, arg, priv);
+            return ec_cdev_ioctl_domain_state(master, arg, priv);
         case EC_IOCTL_SDO_REQUEST_TIMEOUT:
             if (!(filp->f_mode & FMODE_WRITE))
-				return -EPERM;
-			return ec_cdev_ioctl_sdo_request_timeout(master, arg, priv);
+                return -EPERM;
+            return ec_cdev_ioctl_sdo_request_timeout(master, arg, priv);
         case EC_IOCTL_SDO_REQUEST_STATE:
-			return ec_cdev_ioctl_sdo_request_state(master, arg, priv);
+            return ec_cdev_ioctl_sdo_request_state(master, arg, priv);
         case EC_IOCTL_SDO_REQUEST_READ:
             if (!(filp->f_mode & FMODE_WRITE))
-				return -EPERM;
-			return ec_cdev_ioctl_sdo_request_read(master, arg, priv);
+                return -EPERM;
+            return ec_cdev_ioctl_sdo_request_read(master, arg, priv);
         case EC_IOCTL_SDO_REQUEST_WRITE:
             if (!(filp->f_mode & FMODE_WRITE))
-				return -EPERM;
-			return ec_cdev_ioctl_sdo_request_write(master, arg, priv);
+                return -EPERM;
+            return ec_cdev_ioctl_sdo_request_write(master, arg, priv);
         case EC_IOCTL_SDO_REQUEST_DATA:
-			return ec_cdev_ioctl_sdo_request_data(master, arg, priv);
+            return ec_cdev_ioctl_sdo_request_data(master, arg, priv);
         case EC_IOCTL_VOE_SEND_HEADER:
             if (!(filp->f_mode & FMODE_WRITE))
-				return -EPERM;
-			return ec_cdev_ioctl_voe_send_header(master, arg, priv);
+                return -EPERM;
+            return ec_cdev_ioctl_voe_send_header(master, arg, priv);
         case EC_IOCTL_VOE_REC_HEADER:
-			return ec_cdev_ioctl_voe_rec_header(master, arg, priv);
+            return ec_cdev_ioctl_voe_rec_header(master, arg, priv);
         case EC_IOCTL_VOE_READ:
             if (!(filp->f_mode & FMODE_WRITE))
-				return -EPERM;
-			return ec_cdev_ioctl_voe_read(master, arg, priv);
+                return -EPERM;
+            return ec_cdev_ioctl_voe_read(master, arg, priv);
         case EC_IOCTL_VOE_READ_NOSYNC:
             if (!(filp->f_mode & FMODE_WRITE))
-				return -EPERM;
-			return ec_cdev_ioctl_voe_read_nosync(master, arg, priv);
+                return -EPERM;
+            return ec_cdev_ioctl_voe_read_nosync(master, arg, priv);
         case EC_IOCTL_VOE_WRITE:
             if (!(filp->f_mode & FMODE_WRITE))
-				return -EPERM;
-			return ec_cdev_ioctl_voe_write(master, arg, priv);
+                return -EPERM;
+            return ec_cdev_ioctl_voe_write(master, arg, priv);
         case EC_IOCTL_VOE_EXEC:
             if (!(filp->f_mode & FMODE_WRITE))
-				return -EPERM;
-			return ec_cdev_ioctl_voe_exec(master, arg, priv);
+                return -EPERM;
+            return ec_cdev_ioctl_voe_exec(master, arg, priv);
         case EC_IOCTL_VOE_DATA:
-			return ec_cdev_ioctl_voe_data(master, arg, priv);
+            return ec_cdev_ioctl_voe_data(master, arg, priv);
         default:
             return -ENOTTY;
     }
--- a/master/datagram.c	Thu Jul 16 07:52:17 2009 +0000
+++ b/master/datagram.c	Mon Jul 27 10:37:47 2009 +0000
@@ -118,7 +118,7 @@
 {
     if (datagram->data_origin == EC_ORIG_INTERNAL && datagram->data) {
         kfree(datagram->data);
-    	datagram->data = NULL;
+        datagram->data = NULL;
     }
 }
 
--- a/master/device.c	Thu Jul 16 07:52:17 2009 +0000
+++ b/master/device.c	Mon Jul 27 10:37:47 2009 +0000
@@ -319,15 +319,15 @@
 #else
     if (device->dev->hard_start_xmit(skb, device->dev) == NETDEV_TX_OK) {
 #endif
-		device->tx_count++;
-#ifdef EC_DEBUG_IF
-		ec_debug_send(&device->dbg, skb->data, ETH_HLEN + size);
+        device->tx_count++;
+#ifdef EC_DEBUG_IF
+        ec_debug_send(&device->dbg, skb->data, ETH_HLEN + size);
 #endif
 #ifdef EC_DEBUG_RING
-		ec_device_debug_ring_append(
-				device, TX, skb->data + ETH_HLEN, size);
-#endif
-	}
+        ec_device_debug_ring_append(
+                device, TX, skb->data + ETH_HLEN, size);
+#endif
+    }
 }
 
 /*****************************************************************************/
--- a/master/fsm_coe.c	Thu Jul 16 07:52:17 2009 +0000
+++ b/master/fsm_coe.c	Mon Jul 27 10:37:47 2009 +0000
@@ -1084,57 +1084,57 @@
         fsm->state = ec_fsm_coe_error;
         return;
     }
-	
-	if (request->data_size <= 4) { // use expedited transfer type
-	    data = ec_slave_mbox_prepare_send(slave, datagram, 0x03, 10);
+
+    if (request->data_size <= 4) { // use expedited transfer type
+        data = ec_slave_mbox_prepare_send(slave, datagram, 0x03, 10);
         if (IS_ERR(data)) {
-	        fsm->state = ec_fsm_coe_error;
-	        return;
-	    }
-
-	    size = 4 - request->data_size;
-
-	    EC_WRITE_U16(data, 0x2 << 12); // SDO request
-	    EC_WRITE_U8 (data + 2, (0x3 // size specified, expedited
-								| size << 2
-	                            | 0x1 << 5)); // Download request
-	    EC_WRITE_U16(data + 3, request->index);
-	    EC_WRITE_U8 (data + 5, request->subindex);
-	    memcpy(data + 6, request->data, request->data_size);
+            fsm->state = ec_fsm_coe_error;
+            return;
+        }
+
+        size = 4 - request->data_size;
+
+        EC_WRITE_U16(data, 0x2 << 12); // SDO request
+        EC_WRITE_U8 (data + 2, (0x3 // size specified, expedited
+                    | size << 2
+                    | 0x1 << 5)); // Download request
+        EC_WRITE_U16(data + 3, request->index);
+        EC_WRITE_U8 (data + 5, request->subindex);
+        memcpy(data + 6, request->data, request->data_size);
         memset(data + 6 + request->data_size, 0x00, 4 - request->data_size);
 
         if (slave->master->debug_level) {
             EC_DBG("Expedited download request:\n");
             ec_print_data(data, 10);
         }
-	}
+    }
     else { // request->data_size > 4, use normal transfer type
-	    if (slave->configured_rx_mailbox_size < 6 + 10 + request->data_size) {
-	        EC_ERR("SDO fragmenting not supported yet!\n");
-	        fsm->state = ec_fsm_coe_error;
-	        return;
-	    }
-
-	    data = ec_slave_mbox_prepare_send(slave, datagram, 0x03,
+        if (slave->configured_rx_mailbox_size < 6 + 10 + request->data_size) {
+            EC_ERR("SDO fragmenting not supported yet!\n");
+            fsm->state = ec_fsm_coe_error;
+            return;
+        }
+
+        data = ec_slave_mbox_prepare_send(slave, datagram, 0x03,
                 request->data_size + 10);
         if (IS_ERR(data)) {
-	        fsm->state = ec_fsm_coe_error;
-	        return;
-	    }
-
-	    EC_WRITE_U16(data, 0x2 << 12); // SDO request
-	    EC_WRITE_U8 (data + 2, (0x1 // size indicator, normal
-	                            | 0x1 << 5)); // Download request
-	    EC_WRITE_U16(data + 3, request->index);
-	    EC_WRITE_U8 (data + 5, request->subindex);
-	    EC_WRITE_U32(data + 6, request->data_size);
-	    memcpy(data + 10, request->data, request->data_size);
+            fsm->state = ec_fsm_coe_error;
+            return;
+        }
+
+        EC_WRITE_U16(data, 0x2 << 12); // SDO request
+        EC_WRITE_U8 (data + 2, (0x1 // size indicator, normal
+                    | 0x1 << 5)); // Download request
+        EC_WRITE_U16(data + 3, request->index);
+        EC_WRITE_U8 (data + 5, request->subindex);
+        EC_WRITE_U32(data + 6, request->data_size);
+        memcpy(data + 10, request->data, request->data_size);
 
         if (slave->master->debug_level) {
             EC_DBG("Normal download request:\n");
             ec_print_data(data, 10 + request->data_size);
         }
-	}
+    }
 
     fsm->request->jiffies_sent = jiffies;
     fsm->retries = EC_FSM_RETRIES;
--- a/master/fsm_master.c	Thu Jul 16 07:52:17 2009 +0000
+++ b/master/fsm_master.c	Mon Jul 27 10:37:47 2009 +0000
@@ -867,7 +867,7 @@
     wake_up_interruptible(&master->scan_queue);
 
     ec_master_calc_dc(master);
-	
+
     // Attach slave configurations
     ec_master_attach_slave_configs(master);
 
@@ -967,7 +967,7 @@
 /** Master state: WRITE FOE.
  */
 void ec_fsm_master_state_foe_request(
-		ec_fsm_master_t *fsm /**< Master state machine. */
+        ec_fsm_master_t *fsm /**< Master state machine. */
         )
 {
     ec_master_t *master = fsm->master;
--- a/master/fsm_pdo.c	Thu Jul 16 07:52:17 2009 +0000
+++ b/master/fsm_pdo.c	Mon Jul 27 10:37:47 2009 +0000
@@ -641,7 +641,7 @@
 
     // assign first PDO
     fsm->pdo_pos = 1;
-	ec_fsm_pdo_conf_action_assign_pdo(fsm);
+    ec_fsm_pdo_conf_action_assign_pdo(fsm);
 }
 
 /*****************************************************************************/
--- a/master/fsm_sii.c	Thu Jul 16 07:52:17 2009 +0000
+++ b/master/fsm_sii.c	Mon Jul 27 10:37:47 2009 +0000
@@ -139,7 +139,7 @@
     fsm->state(fsm);
 
     return fsm->state != ec_fsm_sii_state_end
-		&& fsm->state != ec_fsm_sii_state_error;
+        && fsm->state != ec_fsm_sii_state_error;
 }
 
 /*****************************************************************************/
@@ -164,8 +164,8 @@
 */
 
 void ec_fsm_sii_state_start_reading(
-		ec_fsm_sii_t *fsm /**< finite state machine */
-		)
+        ec_fsm_sii_t *fsm /**< finite state machine */
+        )
 {
     ec_datagram_t *datagram = fsm->datagram;
 
@@ -184,8 +184,8 @@
     EC_WRITE_U16(datagram->data + 2, fsm->word_offset);
 
 #ifdef SII_DEBUG
-	EC_DBG("reading SII data:\n");
-	ec_print_data(datagram->data, 4);
+    EC_DBG("reading SII data:\n");
+    ec_print_data(datagram->data, 4);
 #endif
 
     fsm->retries = EC_FSM_RETRIES;
@@ -200,8 +200,8 @@
 */
 
 void ec_fsm_sii_state_read_check(
-		ec_fsm_sii_t *fsm /**< finite state machine */
-		)
+        ec_fsm_sii_t *fsm /**< finite state machine */
+        )
 {
     ec_datagram_t *datagram = fsm->datagram;
 
@@ -250,8 +250,8 @@
 */
 
 void ec_fsm_sii_state_read_fetch(
-		ec_fsm_sii_t *fsm /**< finite state machine */
-		)
+        ec_fsm_sii_t *fsm /**< finite state machine */
+        )
 {
     ec_datagram_t *datagram = fsm->datagram;
 
@@ -275,8 +275,8 @@
     }
 
 #ifdef SII_DEBUG
-	EC_DBG("checking SII read state:\n");
-	ec_print_data(datagram->data, 10);
+    EC_DBG("checking SII read state:\n");
+    ec_print_data(datagram->data, 10);
 #endif
 
     if (EC_READ_U8(datagram->data + 1) & 0x20) {
@@ -286,15 +286,15 @@
     }
 
     // check "busy bit"
-    if (EC_READ_U8(datagram->data + 1) & 0x81) { // busy bit or
-												 // read operation busy
+    if (EC_READ_U8(datagram->data + 1) & 0x81) { /* busy bit or
+                                                    read operation busy */
         // still busy... timeout?
         unsigned long diff_ms =
             (datagram->jiffies_received - fsm->jiffies_start) * 1000 / HZ;
         if (diff_ms >= SII_TIMEOUT) {
             if (fsm->check_once_more) {
-				fsm->check_once_more = 0;
-			} else {
+                fsm->check_once_more = 0;
+            } else {
                 EC_ERR("SII: Read timeout.\n");
                 fsm->state = ec_fsm_sii_state_error;
                 return;
@@ -319,23 +319,23 @@
 */
 
 void ec_fsm_sii_state_start_writing(
-		ec_fsm_sii_t *fsm /**< finite state machine */
-		)
+        ec_fsm_sii_t *fsm /**< finite state machine */
+        )
 {
     ec_datagram_t *datagram = fsm->datagram;
 
     // initiate write operation
     ec_datagram_fpwr(datagram, fsm->slave->station_address, 0x502, 8);
-    EC_WRITE_U8 (datagram->data,     0x81); // two address octets
-											// + enable write access
+    EC_WRITE_U8 (datagram->data,     0x81); /* two address octets
+                                               + enable write access */
     EC_WRITE_U8 (datagram->data + 1, 0x02); // request write operation
     EC_WRITE_U16(datagram->data + 2, fsm->word_offset);
-	memset(datagram->data + 4, 0x00, 2);
+    memset(datagram->data + 4, 0x00, 2);
     memcpy(datagram->data + 6, fsm->value, 2);
 
 #ifdef SII_DEBUG
-	EC_DBG("writing SII data:\n");
-	ec_print_data(datagram->data, 8);
+    EC_DBG("writing SII data:\n");
+    ec_print_data(datagram->data, 8);
 #endif
 
     fsm->retries = EC_FSM_RETRIES;
@@ -349,8 +349,8 @@
 */
 
 void ec_fsm_sii_state_write_check(
-		ec_fsm_sii_t *fsm /**< finite state machine */
-		)
+        ec_fsm_sii_t *fsm /**< finite state machine */
+        )
 {
     ec_datagram_t *datagram = fsm->datagram;
 
@@ -390,8 +390,8 @@
 */
 
 void ec_fsm_sii_state_write_check2(
-		ec_fsm_sii_t *fsm /**< finite state machine */
-		)
+        ec_fsm_sii_t *fsm /**< finite state machine */
+        )
 {
     ec_datagram_t *datagram = fsm->datagram;
     unsigned long diff_ms;
@@ -416,8 +416,8 @@
     }
 
 #ifdef SII_DEBUG
-	EC_DBG("checking SII write state:\n");
-	ec_print_data(datagram->data, 2);
+    EC_DBG("checking SII write state:\n");
+    ec_print_data(datagram->data, 2);
 #endif
 
     if (EC_READ_U8(datagram->data + 1) & 0x20) {
@@ -426,25 +426,25 @@
         return;
     }
 
-	/* FIXME: some slaves never answer with the busy flag set...
-	 * wait a few ms for the write operation to complete. */
+    /* FIXME: some slaves never answer with the busy flag set...
+     * wait a few ms for the write operation to complete. */
     diff_ms = (datagram->jiffies_received - fsm->jiffies_start) * 1000 / HZ;
     if (diff_ms < SII_INHIBIT) {
 #ifdef SII_DEBUG
-		EC_DBG("too early.\n");
+        EC_DBG("too early.\n");
 #endif
         // issue check datagram again
         fsm->retries = EC_FSM_RETRIES;
         return;
-	}
-
-    if (EC_READ_U8(datagram->data + 1) & 0x82) { // busy bit or
-												 // write operation busy bit
+    }
+
+    if (EC_READ_U8(datagram->data + 1) & 0x82) { /* busy bit or
+                                                    write operation busy bit */
         // still busy... timeout?
         if (diff_ms >= SII_TIMEOUT) {
             if (fsm->check_once_more) {
-				fsm->check_once_more = 0;
-			} else {
+                fsm->check_once_more = 0;
+            } else {
                 EC_ERR("SII: Write timeout.\n");
                 fsm->state = ec_fsm_sii_state_error;
                 return;
@@ -473,8 +473,8 @@
 */
 
 void ec_fsm_sii_state_error(
-		ec_fsm_sii_t *fsm /**< finite state machine */
-		)
+        ec_fsm_sii_t *fsm /**< finite state machine */
+        )
 {
 }
 
@@ -485,9 +485,9 @@
 */
 
 void ec_fsm_sii_state_end(
-		ec_fsm_sii_t *fsm /**< finite state machine */
-		)
-{
-}
-
-/*****************************************************************************/
+        ec_fsm_sii_t *fsm /**< finite state machine */
+        )
+{
+}
+
+/*****************************************************************************/
--- a/master/fsm_slave_config.c	Thu Jul 16 07:52:17 2009 +0000
+++ b/master/fsm_slave_config.c	Mon Jul 27 10:37:47 2009 +0000
@@ -443,7 +443,7 @@
     // set DC system time offset and transmission delay
     ec_datagram_fpwr(datagram, slave->station_address, 0x0920, 12);
     EC_WRITE_U64(datagram->data, new_offset);
-	EC_WRITE_U32(datagram->data + 8, slave->transmission_delay);
+    EC_WRITE_U32(datagram->data + 8, slave->transmission_delay);
     fsm->retries = EC_FSM_RETRIES;
     fsm->state = ec_fsm_slave_config_state_dc_write_offset;
 }
@@ -829,7 +829,7 @@
         ec_fsm_slave_config_t *fsm /**< slave state machine */
         )
 {
-	// TODO check for config here
+    // TODO check for config here
 
     if (ec_fsm_pdo_exec(fsm->fsm_pdo))
         return;
--- a/master/ioctl.h	Thu Jul 16 07:52:17 2009 +0000
+++ b/master/ioctl.h	Mon Jul 27 10:37:47 2009 +0000
@@ -239,13 +239,13 @@
 
 typedef struct {
     // inputs
-	uint32_t index;
-
-    // outputs
-	uint32_t data_size;
-	uint32_t logical_base_address;
-	uint16_t working_counter;
-	uint16_t expected_working_counter;
+    uint32_t index;
+
+    // outputs
+    uint32_t data_size;
+    uint32_t logical_base_address;
+    uint16_t working_counter;
+    uint16_t expected_working_counter;
     uint32_t fmmu_count;
 } ec_ioctl_domain_t;
 
@@ -253,15 +253,15 @@
 
 typedef struct {
     // inputs
-	uint32_t domain_index;
-	uint32_t fmmu_index;
+    uint32_t domain_index;
+    uint32_t fmmu_index;
 
     // outputs
     uint16_t slave_config_alias;
     uint16_t slave_config_position;
     uint8_t sync_index;
     ec_direction_t dir;
-	uint32_t logical_address;
+    uint32_t logical_address;
     uint32_t data_size;
 } ec_ioctl_domain_fmmu_t;
 
@@ -269,7 +269,7 @@
 
 typedef struct {
     // inputs
-	uint32_t domain_index;
+    uint32_t domain_index;
     uint32_t data_size;
     uint8_t *target;
 } ec_ioctl_domain_data_t;
@@ -278,7 +278,7 @@
 
 typedef struct {
     // inputs
-	uint16_t slave_position;
+    uint16_t slave_position;
     uint8_t al_state;
 } ec_ioctl_slave_state_t;
 
@@ -448,15 +448,15 @@
     uint16_t eoe_index;
 
     // outputs
-	char name[EC_DATAGRAM_NAME_SIZE];
-	uint16_t slave_position;
-	uint8_t open;
-	uint32_t rx_bytes;
-	uint32_t rx_rate;
-	uint32_t tx_bytes;
-	uint32_t tx_rate;
-	uint32_t tx_queued_frames;
-	uint32_t tx_queue_size;
+    char name[EC_DATAGRAM_NAME_SIZE];
+    uint16_t slave_position;
+    uint8_t open;
+    uint32_t rx_bytes;
+    uint32_t rx_rate;
+    uint32_t tx_bytes;
+    uint32_t tx_rate;
+    uint32_t tx_queued_frames;
+    uint32_t tx_queue_size;
 } ec_ioctl_eoe_handler_t;
 
 /*****************************************************************************/
--- a/master/master.c	Thu Jul 16 07:52:17 2009 +0000
+++ b/master/master.c	Mon Jul 27 10:37:47 2009 +0000
@@ -129,9 +129,9 @@
     
     INIT_LIST_HEAD(&master->configs);
 
-	master->app_time = 0ULL;
-	master->app_start_time = 0ULL;
-	master->has_start_time = 0;
+    master->app_time = 0ULL;
+    master->app_start_time = 0ULL;
+    master->has_start_time = 0;
 
     master->scan_busy = 0;
     master->allow_scan = 1;
@@ -224,7 +224,7 @@
         EC_ERR("Failed to allocate synchronisation datagram.\n");
         goto out_clear_ref_sync;
     }
-	ec_master_find_dc_ref_clock(master);
+    ec_master_find_dc_ref_clock(master);
 
     // init character device
     ret = ec_cdev_init(&master->cdev, master, device_number);
@@ -1257,17 +1257,17 @@
  * \return Number of configurations.
  */
 unsigned int ec_master_config_count(
-		const ec_master_t *master /**< EtherCAT master. */
-		)
-{
-	const ec_slave_config_t *sc;
-	unsigned int count = 0;
-
-	list_for_each_entry(sc, &master->configs, list) {
-		count++;
-	}
-
-	return count;
+        const ec_master_t *master /**< EtherCAT master. */
+        )
+{
+    const ec_slave_config_t *sc;
+    unsigned int count = 0;
+
+    list_for_each_entry(sc, &master->configs, list) {
+        count++;
+    }
+
+    return count;
 }
 
 /*****************************************************************************/
@@ -1277,12 +1277,12 @@
  */
 #define EC_FIND_CONFIG \
     do { \
-		list_for_each_entry(sc, &master->configs, list) { \
-			if (pos--) \
-				continue; \
-			return sc; \
-		} \
-		return NULL; \
+        list_for_each_entry(sc, &master->configs, list) { \
+            if (pos--) \
+                continue; \
+            return sc; \
+        } \
+        return NULL; \
     } while (0)
 
 /** Get a slave configuration via its position in the list.
@@ -1290,12 +1290,12 @@
  * \return Slave configuration or \a NULL.
  */
 ec_slave_config_t *ec_master_get_config(
-		const ec_master_t *master, /**< EtherCAT master. */
-		unsigned int pos /**< List position. */
-		)
-{
-	ec_slave_config_t *sc;
-	EC_FIND_CONFIG;
+        const ec_master_t *master, /**< EtherCAT master. */
+        unsigned int pos /**< List position. */
+        )
+{
+    ec_slave_config_t *sc;
+    EC_FIND_CONFIG;
 }
 
 /** Get a slave configuration via its position in the list.
@@ -1305,12 +1305,12 @@
  * \return Slave configuration or \a NULL.
  */
 const ec_slave_config_t *ec_master_get_config_const(
-		const ec_master_t *master, /**< EtherCAT master. */
-		unsigned int pos /**< List position. */
-		)
-{
-	const ec_slave_config_t *sc;
-	EC_FIND_CONFIG;
+        const ec_master_t *master, /**< EtherCAT master. */
+        unsigned int pos /**< List position. */
+        )
+{
+    const ec_slave_config_t *sc;
+    EC_FIND_CONFIG;
 }
 
 /*****************************************************************************/
@@ -1320,17 +1320,17 @@
  * \return Number of domains.
  */
 unsigned int ec_master_domain_count(
-		const ec_master_t *master /**< EtherCAT master. */
-		)
-{
-	const ec_domain_t *domain;
-	unsigned int count = 0;
-
-	list_for_each_entry(domain, &master->domains, list) {
-		count++;
-	}
-
-	return count;
+        const ec_master_t *master /**< EtherCAT master. */
+        )
+{
+    const ec_domain_t *domain;
+    unsigned int count = 0;
+
+    list_for_each_entry(domain, &master->domains, list) {
+        count++;
+    }
+
+    return count;
 }
 
 /*****************************************************************************/
@@ -1354,11 +1354,11 @@
  * \return Domain pointer, or \a NULL if not found.
  */
 ec_domain_t *ec_master_find_domain(
-		ec_master_t *master, /**< EtherCAT master. */
-		unsigned int index /**< Domain index. */
-		)
-{
-	ec_domain_t *domain;
+        ec_master_t *master, /**< EtherCAT master. */
+        unsigned int index /**< Domain index. */
+        )
+{
+    ec_domain_t *domain;
     EC_FIND_DOMAIN;
 }
 
@@ -1369,11 +1369,11 @@
  * \return Domain pointer, or \a NULL if not found.
  */
 const ec_domain_t *ec_master_find_domain_const(
-		const ec_master_t *master, /**< EtherCAT master. */
-		unsigned int index /**< Domain index. */
-		)
-{
-	const ec_domain_t *domain;
+        const ec_master_t *master, /**< EtherCAT master. */
+        unsigned int index /**< Domain index. */
+        )
+{
+    const ec_domain_t *domain;
     EC_FIND_DOMAIN;
 }
 
@@ -1384,17 +1384,17 @@
  * \return Number of EoE handlers.
  */
 uint16_t ec_master_eoe_handler_count(
-		const ec_master_t *master /**< EtherCAT master. */
-		)
-{
-	const ec_eoe_t *eoe;
-	unsigned int count = 0;
-
-	list_for_each_entry(eoe, &master->eoe_handlers, list) {
-		count++;
-	}
-
-	return count;
+        const ec_master_t *master /**< EtherCAT master. */
+        )
+{
+    const ec_eoe_t *eoe;
+    unsigned int count = 0;
+
+    list_for_each_entry(eoe, &master->eoe_handlers, list) {
+        count++;
+    }
+
+    return count;
 }
 
 /*****************************************************************************/
@@ -1406,19 +1406,19 @@
  * \return EoE handler pointer, or \a NULL if not found.
  */
 const ec_eoe_t *ec_master_get_eoe_handler_const(
-		const ec_master_t *master, /**< EtherCAT master. */
-		uint16_t index /**< EoE handler index. */
-		)
-{
-	const ec_eoe_t *eoe;
-
-	list_for_each_entry(eoe, &master->eoe_handlers, list) {
-		if (index--)
-			continue;
-		return eoe;
-	}
-
-	return NULL;
+        const ec_master_t *master, /**< EtherCAT master. */
+        uint16_t index /**< EoE handler index. */
+        )
+{
+    const ec_eoe_t *eoe;
+
+    list_for_each_entry(eoe, &master->eoe_handlers, list) {
+        if (index--)
+            continue;
+        return eoe;
+    }
+
+    return NULL;
 }
 
 /*****************************************************************************/
@@ -1452,9 +1452,9 @@
  */
 void ec_master_find_dc_ref_clock(
         ec_master_t *master /**< EtherCAT master. */
-		)
-{
-	ec_slave_t *slave, *ref = NULL;
+        )
+{
+    ec_slave_t *slave, *ref = NULL;
 
     for (slave = master->slaves;
             slave < master->slaves + master->slave_count;
@@ -1480,7 +1480,7 @@
         ec_master_t *master, /**< EtherCAT master. */
         ec_slave_t *port0_slave, /**< Slave at port 0. */
         unsigned int *slave_position /**< Slave position. */
-		)
+        )
 {
     ec_slave_t *slave = master->slaves + *slave_position;
     unsigned int i;
@@ -1512,7 +1512,7 @@
  */
 void ec_master_calc_topology(
         ec_master_t *master /**< EtherCAT master. */
-		)
+        )
 {
     unsigned int slave_position = 0;
 
@@ -1529,9 +1529,9 @@
  */
 void ec_master_calc_transmission_delays(
         ec_master_t *master /**< EtherCAT master. */
-		)
-{
-	ec_slave_t *slave;
+        )
+{
+    ec_slave_t *slave;
 
     for (slave = master->slaves;
             slave < master->slaves + master->slave_count;
@@ -1551,10 +1551,10 @@
  */
 void ec_master_calc_dc(
         ec_master_t *master /**< EtherCAT master. */
-		)
-{
-	// find DC reference clock
-	ec_master_find_dc_ref_clock(master);
+        )
+{
+    // find DC reference clock
+    ec_master_find_dc_ref_clock(master);
 
     // calculate bus topology
     ec_master_calc_topology(master);
--- a/master/slave.c	Thu Jul 16 07:52:17 2009 +0000
+++ b/master/slave.c	Mon Jul 27 10:37:47 2009 +0000
@@ -747,7 +747,7 @@
  */
 uint32_t ec_slave_calc_rtt_sum(
         ec_slave_t *slave /**< EtherCAT slave. */
-		)
+        )
 {
     uint32_t rtt_sum = 0, rtt;
     unsigned int i;
@@ -768,7 +768,7 @@
  */
 ec_slave_t *ec_slave_find_next_dc_slave(
         ec_slave_t *slave /**< EtherCAT slave. */
-		)
+        )
 {
     ec_slave_t *dc_slave = NULL;
 
@@ -796,7 +796,7 @@
  */
 void ec_slave_calc_port_delays(
         ec_slave_t *slave /**< EtherCAT slave. */
-		)
+        )
 {
     unsigned int i;
     ec_slave_t *next, *next_dc;
@@ -834,7 +834,7 @@
 void ec_slave_calc_transmission_delays_rec(
         ec_slave_t *slave, /**< Current slave. */
         uint32_t *delay /**< Sum of delays. */
-		)
+        )
 {
     unsigned int i;
     ec_slave_t *next, *next_dc;
--- a/master/slave_config.c	Thu Jul 16 07:52:17 2009 +0000
+++ b/master/slave_config.c	Mon Jul 27 10:37:47 2009 +0000
@@ -74,11 +74,11 @@
 
     sc->used_fmmus = 0;
 
-	sc->dc_assign_activate = 0x0000;
-	sc->dc_sync[0].cycle_time = 0x00000000;
-	sc->dc_sync[1].cycle_time = 0x00000000;
-	sc->dc_sync[0].shift_time = 0x00000000;
-	sc->dc_sync[1].shift_time = 0x00000000;
+    sc->dc_assign_activate = 0x0000;
+    sc->dc_sync[0].cycle_time = 0x00000000;
+    sc->dc_sync[1].cycle_time = 0x00000000;
+    sc->dc_sync[0].shift_time = 0x00000000;
+    sc->dc_sync[1].shift_time = 0x00000000;
 
     INIT_LIST_HEAD(&sc->sdo_configs);
     INIT_LIST_HEAD(&sc->sdo_requests);
@@ -184,10 +184,10 @@
         ec_slave_config_t *sc /**< Slave configuration. */
         )
 {
-	ec_slave_t *slave;
-
-	if (sc->slave)
-		return 0; // already attached
+    ec_slave_t *slave;
+
+    if (sc->slave)
+        return 0; // already attached
 
     if (!(slave = ec_master_find_slave(
                     sc->master, sc->alias, sc->position))) {
@@ -197,7 +197,7 @@
         return -ENOENT;
     }
 
-	if (slave->config) {
+    if (slave->config) {
         if (sc->master->debug_level)
             EC_DBG("Failed to attach slave configuration %u:%u. Slave %u"
                     " already has a configuration!\n", sc->alias,
@@ -214,11 +214,11 @@
                     slave->sii.product_code, sc->alias, sc->position,
                     sc->vendor_id, sc->product_code);
         return -EINVAL;
-	}
-
-	// attach slave
-	slave->config = sc;
-	sc->slave = slave;
+    }
+
+    // attach slave
+    slave->config = sc;
+    sc->slave = slave;
 
     ec_slave_request_state(slave, EC_SLAVE_STATE_OP);
 
@@ -226,7 +226,7 @@
         EC_DBG("Attached slave %u to config %u:%u.\n",
                 slave->ring_position, sc->alias, sc->position);
 
-	return 0;
+    return 0;
 }
 
 /*****************************************************************************/
@@ -334,14 +334,14 @@
         const ec_slave_config_t *sc /**< Slave configuration. */
         )
 {
-	const ec_sdo_request_t *req;
-	unsigned int count = 0;
-
-	list_for_each_entry(req, &sc->sdo_configs, list) {
-		count++;
-	}
-
-	return count;
+    const ec_sdo_request_t *req;
+    unsigned int count = 0;
+
+    list_for_each_entry(req, &sc->sdo_configs, list) {
+        count++;
+    }
+
+    return count;
 }
 
 /*****************************************************************************/
@@ -679,11 +679,11 @@
         uint32_t sync0_cycle_time, uint32_t sync0_shift_time,
         uint32_t sync1_cycle_time, uint32_t sync1_shift_time)
 {
-	sc->dc_assign_activate = assign_activate;
-	sc->dc_sync[0].cycle_time = sync0_cycle_time;
-	sc->dc_sync[0].shift_time = sync0_shift_time;
-	sc->dc_sync[1].cycle_time = sync1_cycle_time;
-	sc->dc_sync[1].shift_time = sync1_shift_time;
+    sc->dc_assign_activate = assign_activate;
+    sc->dc_sync[0].cycle_time = sync0_cycle_time;
+    sc->dc_sync[0].shift_time = sync0_shift_time;
+    sc->dc_sync[1].cycle_time = sync1_cycle_time;
+    sc->dc_sync[1].shift_time = sync1_shift_time;
 }
 
 /*****************************************************************************/
--- a/master/slave_config.h	Thu Jul 16 07:52:17 2009 +0000
+++ b/master/slave_config.h	Mon Jul 27 10:37:47 2009 +0000
@@ -91,7 +91,7 @@
 ec_sdo_request_t *ec_slave_config_find_sdo_request(ec_slave_config_t *,
         unsigned int);
 ec_voe_handler_t *ec_slave_config_find_voe_handler(ec_slave_config_t *,
-		unsigned int);
+        unsigned int);
 
 ec_sdo_request_t *ecrt_slave_config_create_sdo_request_err(
         ec_slave_config_t *, uint16_t, uint8_t, size_t);
--- a/master/voe_handler.c	Thu Jul 16 07:52:17 2009 +0000
+++ b/master/voe_handler.c	Mon Jul 27 10:37:47 2009 +0000
@@ -108,14 +108,14 @@
 /** Get usable memory size.
  */
 size_t ec_voe_handler_mem_size(
-		const ec_voe_handler_t *voe /**< VoE handler. */
-		)
-{
-	if (voe->datagram.mem_size >= EC_MBOX_HEADER_SIZE + EC_VOE_HEADER_SIZE)
-		return voe->datagram.mem_size -
-			(EC_MBOX_HEADER_SIZE + EC_VOE_HEADER_SIZE);
-	else
-		return 0;
+        const ec_voe_handler_t *voe /**< VoE handler. */
+        )
+{
+    if (voe->datagram.mem_size >= EC_MBOX_HEADER_SIZE + EC_VOE_HEADER_SIZE)
+        return voe->datagram.mem_size -
+            (EC_MBOX_HEADER_SIZE + EC_VOE_HEADER_SIZE);
+    else
+        return 0;
 }
 
 /*****************************************************************************
@@ -223,7 +223,7 @@
         voe->request_state = EC_INT_REQUEST_FAILURE;
         return;
     }
-	
+
     data = ec_slave_mbox_prepare_send(slave, &voe->datagram,
             EC_MBOX_TYPE_VOE, EC_VOE_HEADER_SIZE + voe->data_size);
     if (IS_ERR(data)) {
@@ -308,7 +308,7 @@
         voe->request_state = EC_INT_REQUEST_FAILURE;
         return;
     }
-	
+
     ec_slave_mbox_prepare_check(slave, datagram); // can not fail.
 
     voe->jiffies_start = jiffies;
@@ -451,7 +451,7 @@
         voe->request_state = EC_INT_REQUEST_FAILURE;
         return;
     }
-	
+
     ec_slave_mbox_prepare_fetch(slave, datagram); // can not fail.
 
     voe->jiffies_start = jiffies;
@@ -502,7 +502,7 @@
     }
 
     if (!(data = ec_slave_mbox_fetch(slave, datagram,
-				     &mbox_prot, &rec_size))) {
+                    &mbox_prot, &rec_size))) {
         voe->state = ec_voe_handler_state_error;
         voe->request_state = EC_INT_REQUEST_FAILURE;
         return;