master/device.c
changeset 70 6693d7e25d5e
parent 54 7506e67dd122
child 73 9f4ea66d89a3
equal deleted inserted replaced
69:69dad4ec73c2 70:6693d7e25d5e
   345 
   345 
   346 /*****************************************************************************/
   346 /*****************************************************************************/
   347 
   347 
   348 int EtherCAT_dev_is_ec(ec_device_t *ecd, struct net_device *dev)
   348 int EtherCAT_dev_is_ec(ec_device_t *ecd, struct net_device *dev)
   349 {
   349 {
   350   return ecd->dev == dev;
   350   return ecd && ecd->dev == dev;
   351 }
   351 }
   352 
   352 
   353 /*****************************************************************************/
   353 /*****************************************************************************/
   354 
   354 
   355 int EtherCAT_dev_receive(ec_device_t *ecd, void *data, unsigned int size)
   355 int EtherCAT_dev_receive(ec_device_t *ecd, void *data, unsigned int size)