Browse Source

[DeviceDrivers] code cleanup for CAN

BernardXiong 10 years ago
parent
commit
2ca3ceab70
1 changed files with 0 additions and 8 deletions
  1. 0 8
      components/drivers/can/can.c

+ 0 - 8
components/drivers/can/can.c

@@ -322,10 +322,6 @@ static rt_err_t rt_can_open(struct rt_device *dev, rt_uint16_t oflag)
             /* configure low level device */
             /* configure low level device */
             can->ops->control(can, RT_DEVICE_CTRL_SET_INT, (void *)RT_DEVICE_FLAG_INT_RX);
             can->ops->control(can, RT_DEVICE_CTRL_SET_INT, (void *)RT_DEVICE_FLAG_INT_RX);
         }
         }
-        else
-        {
-            can->can_rx = RT_NULL;
-        }
     }
     }
 
 
     if (can->can_tx == RT_NULL)
     if (can->can_tx == RT_NULL)
@@ -356,10 +352,6 @@ static rt_err_t rt_can_open(struct rt_device *dev, rt_uint16_t oflag)
             /* configure low level device */
             /* configure low level device */
             can->ops->control(can, RT_DEVICE_CTRL_SET_INT, (void *)RT_DEVICE_FLAG_INT_TX);
             can->ops->control(can, RT_DEVICE_CTRL_SET_INT, (void *)RT_DEVICE_FLAG_INT_TX);
         }
         }
-        else
-        {
-            can->can_tx = RT_NULL;
-        }
     }
     }
 
 
     can->ops->control(can, RT_DEVICE_CTRL_SET_INT, (void *)RT_DEVICE_CAN_INT_ERR);
     can->ops->control(can, RT_DEVICE_CTRL_SET_INT, (void *)RT_DEVICE_CAN_INT_ERR);