net: phy: used the PHY_ID_MATCH_MODEL macro for LAN87XX

Used the PHY_ID_MATCH_MODEL MACRO for describing the phy_id and
phy_id_mask.

Signed-off-by: Arun Ramadoss <arun.ramadoss@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Arun Ramadoss
2022-03-04 15:13:57 +05:30
committed by David S. Miller
parent 8eee3d3536
commit 79cea9a9c9

View File

@@ -9,6 +9,8 @@
#include <linux/ethtool.h> #include <linux/ethtool.h>
#include <linux/ethtool_netlink.h> #include <linux/ethtool_netlink.h>
#define PHY_ID_LAN87XX 0x0007c150
/* External Register Control Register */ /* External Register Control Register */
#define LAN87XX_EXT_REG_CTL (0x14) #define LAN87XX_EXT_REG_CTL (0x14)
#define LAN87XX_EXT_REG_CTL_RD_CTL (0x1000) #define LAN87XX_EXT_REG_CTL_RD_CTL (0x1000)
@@ -496,8 +498,7 @@ static int lan87xx_cable_test_get_status(struct phy_device *phydev,
static struct phy_driver microchip_t1_phy_driver[] = { static struct phy_driver microchip_t1_phy_driver[] = {
{ {
.phy_id = 0x0007c150, PHY_ID_MATCH_MODEL(PHY_ID_LAN87XX),
.phy_id_mask = 0xfffffff0,
.name = "Microchip LAN87xx T1", .name = "Microchip LAN87xx T1",
.flags = PHY_POLL_CABLE_TEST, .flags = PHY_POLL_CABLE_TEST,
@@ -518,7 +519,7 @@ static struct phy_driver microchip_t1_phy_driver[] = {
module_phy_driver(microchip_t1_phy_driver); module_phy_driver(microchip_t1_phy_driver);
static struct mdio_device_id __maybe_unused microchip_t1_tbl[] = { static struct mdio_device_id __maybe_unused microchip_t1_tbl[] = {
{ 0x0007c150, 0xfffffff0 }, { PHY_ID_MATCH_MODEL(PHY_ID_LAN87XX) },
{ } { }
}; };