Skip to content

Commit f08469d

Browse files
Csókás Bencedavem330
authored andcommitted
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: Csókás Bence <[email protected]> Reviewed-by: Simon Horman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 68af900 commit f08469d

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

drivers/net/ethernet/freescale/fec_ptp.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -443,21 +443,21 @@ static int fec_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
443443
*/
444444
static int fec_ptp_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts)
445445
{
446-
struct fec_enet_private *adapter =
446+
struct fec_enet_private *fep =
447447
container_of(ptp, struct fec_enet_private, ptp_caps);
448448
u64 ns;
449449
unsigned long flags;
450450

451-
mutex_lock(&adapter->ptp_clk_mutex);
451+
mutex_lock(&fep->ptp_clk_mutex);
452452
/* Check the ptp clock */
453-
if (!adapter->ptp_clk_on) {
454-
mutex_unlock(&adapter->ptp_clk_mutex);
453+
if (!fep->ptp_clk_on) {
454+
mutex_unlock(&fep->ptp_clk_mutex);
455455
return -EINVAL;
456456
}
457-
spin_lock_irqsave(&adapter->tmreg_lock, flags);
458-
ns = timecounter_read(&adapter->tc);
459-
spin_unlock_irqrestore(&adapter->tmreg_lock, flags);
460-
mutex_unlock(&adapter->ptp_clk_mutex);
457+
spin_lock_irqsave(&fep->tmreg_lock, flags);
458+
ns = timecounter_read(&fep->tc);
459+
spin_unlock_irqrestore(&fep->tmreg_lock, flags);
460+
mutex_unlock(&fep->ptp_clk_mutex);
461461

462462
*ts = ns_to_timespec64(ns);
463463

0 commit comments

Comments
 (0)