equal
deleted
inserted
replaced
1648 ec_master_t *master, /**< EtherCAT master. */ |
1648 ec_master_t *master, /**< EtherCAT master. */ |
1649 unsigned long arg, /**< ioctl() argument. */ |
1649 unsigned long arg, /**< ioctl() argument. */ |
1650 ec_cdev_priv_t *priv /**< Private data structure of file handle. */ |
1650 ec_cdev_priv_t *priv /**< Private data structure of file handle. */ |
1651 ) |
1651 ) |
1652 { |
1652 { |
1653 ec_ioctl_dc_t data; |
|
1654 |
|
1655 if (unlikely(!priv->requested)) |
1653 if (unlikely(!priv->requested)) |
1656 return -EPERM; |
1654 return -EPERM; |
1657 |
1655 |
1658 if (copy_from_user(&data, (void __user *) arg, sizeof(data))) |
|
1659 return -EFAULT; |
|
1660 |
|
1661 spin_lock_bh(&master->internal_lock); |
1656 spin_lock_bh(&master->internal_lock); |
1662 ecrt_master_sync_reference_clock(master, data.app_time); |
1657 ecrt_master_sync_reference_clock(master); |
1663 spin_unlock_bh(&master->internal_lock); |
1658 spin_unlock_bh(&master->internal_lock); |
1664 return 0; |
1659 return 0; |
1665 } |
1660 } |
1666 |
1661 |
1667 /*****************************************************************************/ |
1662 /*****************************************************************************/ |