mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
igb: use ktime_get_real helpers in igb_ptp_reset()
Replace ktime_to_ns(ktime_get_real()) with the direct equivalent ktime_get_real_ns() and ktime_to_timespec64(ktime_get_real()) with ktime_get_real_ts64() in igb_ptp_reset(). Using the combined helpers makes the intent clearer. Suggested-by: Jacob Keller <jacob.e.keller@intel.com> Suggested-by: Simon Horman <horms@kernel.org> Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de> Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> Link: https://patch.msgid.link/20260609213559.178657-8-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
06be82a0d9
commit
2040b8ba37
|
|
@ -1500,12 +1500,13 @@ void igb_ptp_reset(struct igb_adapter *adapter)
|
|||
|
||||
/* Re-initialize the timer. */
|
||||
if ((hw->mac.type == e1000_i210) || (hw->mac.type == e1000_i211)) {
|
||||
struct timespec64 ts = ktime_to_timespec64(ktime_get_real());
|
||||
struct timespec64 ts;
|
||||
|
||||
ktime_get_real_ts64(&ts);
|
||||
igb_ptp_write_i210(adapter, &ts);
|
||||
} else {
|
||||
timecounter_init(&adapter->tc, &adapter->cc,
|
||||
ktime_to_ns(ktime_get_real()));
|
||||
ktime_get_real_ns());
|
||||
}
|
||||
out:
|
||||
spin_unlock_irqrestore(&adapter->tmreg_lock, flags);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user