Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: phy: mscc: use new PTP_MSGTYPE_* defines

Use recently introduced PTP_MSGTYPE_SYNC and PTP_MSGTYPE_DELAY_REQ
defines instead of a driver internal enumeration.

Signed-off-by: Christian Eggers <ceggers@arri.de>
Reviewed-by: Antoine Tenart <atenart@kernel.org>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Christian Eggers and committed by
Jakub Kicinski
29872216 37e9d055

+7 -12
+7 -7
drivers/net/phy/mscc/mscc_ptp.c
··· 506 506 { 507 507 struct vsc8531_private *vsc8531 = phydev->priv; 508 508 bool base = phydev->mdio.addr == vsc8531->ts_base_addr; 509 - enum vsc85xx_ptp_msg_type msgs[] = { 510 - PTP_MSG_TYPE_SYNC, 511 - PTP_MSG_TYPE_DELAY_REQ 509 + u8 msgs[] = { 510 + PTP_MSGTYPE_SYNC, 511 + PTP_MSGTYPE_DELAY_REQ 512 512 }; 513 513 u32 val; 514 514 u8 i; ··· 847 847 static int vsc85xx_ptp_conf(struct phy_device *phydev, enum ts_blk blk, 848 848 bool one_step, bool enable) 849 849 { 850 - enum vsc85xx_ptp_msg_type msgs[] = { 851 - PTP_MSG_TYPE_SYNC, 852 - PTP_MSG_TYPE_DELAY_REQ 850 + u8 msgs[] = { 851 + PTP_MSGTYPE_SYNC, 852 + PTP_MSGTYPE_DELAY_REQ 853 853 }; 854 854 u32 val; 855 855 u8 i; ··· 858 858 if (blk == INGRESS) 859 859 vsc85xx_ts_ptp_action_flow(phydev, blk, msgs[i], 860 860 PTP_WRITE_NS); 861 - else if (msgs[i] == PTP_MSG_TYPE_SYNC && one_step) 861 + else if (msgs[i] == PTP_MSGTYPE_SYNC && one_step) 862 862 /* no need to know Sync t when sending in one_step */ 863 863 vsc85xx_ts_ptp_action_flow(phydev, blk, msgs[i], 864 864 PTP_WRITE_1588);
-5
drivers/net/phy/mscc/mscc_ptp.h
··· 436 436 PTP_SAVE_IN_TS_FIFO = 11, /* invalid when writing in reg */ 437 437 }; 438 438 439 - enum vsc85xx_ptp_msg_type { 440 - PTP_MSG_TYPE_SYNC, 441 - PTP_MSG_TYPE_DELAY_REQ, 442 - }; 443 - 444 439 struct vsc85xx_ptphdr { 445 440 u8 tsmt; /* transportSpecific | messageType */ 446 441 u8 ver; /* reserved0 | versionPTP */