Commit f08469d0 authored by Csókás Bence's avatar Csókás Bence Committed by David S. Miller

net: fec: Refactor: rename `adapter` to `fep`

Rename local `struct fec_enet_private *adapter` to `fep` in `fec_ptp_gettime()` to match the rest of the driver
Signed-off-by: default avatarCsókás Bence <csokas.bence@prolan.hu>
Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 68af9000
...@@ -443,21 +443,21 @@ static int fec_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta) ...@@ -443,21 +443,21 @@ static int fec_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
*/ */
static int fec_ptp_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts) static int fec_ptp_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts)
{ {
struct fec_enet_private *adapter = struct fec_enet_private *fep =
container_of(ptp, struct fec_enet_private, ptp_caps); container_of(ptp, struct fec_enet_private, ptp_caps);
u64 ns; u64 ns;
unsigned long flags; unsigned long flags;
mutex_lock(&adapter->ptp_clk_mutex); mutex_lock(&fep->ptp_clk_mutex);
/* Check the ptp clock */ /* Check the ptp clock */
if (!adapter->ptp_clk_on) { if (!fep->ptp_clk_on) {
mutex_unlock(&adapter->ptp_clk_mutex); mutex_unlock(&fep->ptp_clk_mutex);
return -EINVAL; return -EINVAL;
} }
spin_lock_irqsave(&adapter->tmreg_lock, flags); spin_lock_irqsave(&fep->tmreg_lock, flags);
ns = timecounter_read(&adapter->tc); ns = timecounter_read(&fep->tc);
spin_unlock_irqrestore(&adapter->tmreg_lock, flags); spin_unlock_irqrestore(&fep->tmreg_lock, flags);
mutex_unlock(&adapter->ptp_clk_mutex); mutex_unlock(&fep->ptp_clk_mutex);
*ts = ns_to_timespec64(ns); *ts = ns_to_timespec64(ns);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment