Skip to content

Commit 79cea9a

Browse files
rarun-mchpdavem330
authored andcommitted
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>
1 parent 8eee3d3 commit 79cea9a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

drivers/net/phy/microchip_t1.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
#include <linux/ethtool.h>
1010
#include <linux/ethtool_netlink.h>
1111

12+
#define PHY_ID_LAN87XX 0x0007c150
13+
1214
/* External Register Control Register */
1315
#define LAN87XX_EXT_REG_CTL (0x14)
1416
#define LAN87XX_EXT_REG_CTL_RD_CTL (0x1000)
@@ -496,8 +498,7 @@ static int lan87xx_cable_test_get_status(struct phy_device *phydev,
496498

497499
static struct phy_driver microchip_t1_phy_driver[] = {
498500
{
499-
.phy_id = 0x0007c150,
500-
.phy_id_mask = 0xfffffff0,
501+
PHY_ID_MATCH_MODEL(PHY_ID_LAN87XX),
501502
.name = "Microchip LAN87xx T1",
502503
.flags = PHY_POLL_CABLE_TEST,
503504

@@ -518,7 +519,7 @@ static struct phy_driver microchip_t1_phy_driver[] = {
518519
module_phy_driver(microchip_t1_phy_driver);
519520

520521
static struct mdio_device_id __maybe_unused microchip_t1_tbl[] = {
521-
{ 0x0007c150, 0xfffffff0 },
522+
{ PHY_ID_MATCH_MODEL(PHY_ID_LAN87XX) },
522523
{ }
523524
};
524525

0 commit comments

Comments
 (0)