Commit 4d5dfb66 authored by Heiner Kallweit's avatar Heiner Kallweit Committed by David S. Miller

net: phy: aquantia: use macro PHY_ID_MATCH_MODEL

Make use of macro PHY_ID_MATCH_MODEL to simplify the code.
Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 81e6578c
...@@ -101,8 +101,7 @@ static int aqr_read_status(struct phy_device *phydev) ...@@ -101,8 +101,7 @@ static int aqr_read_status(struct phy_device *phydev)
static struct phy_driver aqr_driver[] = { static struct phy_driver aqr_driver[] = {
{ {
.phy_id = PHY_ID_AQ1202, PHY_ID_MATCH_MODEL(PHY_ID_AQ1202),
.phy_id_mask = 0xfffffff0,
.name = "Aquantia AQ1202", .name = "Aquantia AQ1202",
.features = PHY_10GBIT_FULL_FEATURES, .features = PHY_10GBIT_FULL_FEATURES,
.aneg_done = genphy_c45_aneg_done, .aneg_done = genphy_c45_aneg_done,
...@@ -112,8 +111,7 @@ static struct phy_driver aqr_driver[] = { ...@@ -112,8 +111,7 @@ static struct phy_driver aqr_driver[] = {
.read_status = aqr_read_status, .read_status = aqr_read_status,
}, },
{ {
.phy_id = PHY_ID_AQ2104, PHY_ID_MATCH_MODEL(PHY_ID_AQ2104),
.phy_id_mask = 0xfffffff0,
.name = "Aquantia AQ2104", .name = "Aquantia AQ2104",
.features = PHY_10GBIT_FULL_FEATURES, .features = PHY_10GBIT_FULL_FEATURES,
.aneg_done = genphy_c45_aneg_done, .aneg_done = genphy_c45_aneg_done,
...@@ -123,8 +121,7 @@ static struct phy_driver aqr_driver[] = { ...@@ -123,8 +121,7 @@ static struct phy_driver aqr_driver[] = {
.read_status = aqr_read_status, .read_status = aqr_read_status,
}, },
{ {
.phy_id = PHY_ID_AQR105, PHY_ID_MATCH_MODEL(PHY_ID_AQR105),
.phy_id_mask = 0xfffffff0,
.name = "Aquantia AQR105", .name = "Aquantia AQR105",
.features = PHY_10GBIT_FULL_FEATURES, .features = PHY_10GBIT_FULL_FEATURES,
.aneg_done = genphy_c45_aneg_done, .aneg_done = genphy_c45_aneg_done,
...@@ -134,8 +131,7 @@ static struct phy_driver aqr_driver[] = { ...@@ -134,8 +131,7 @@ static struct phy_driver aqr_driver[] = {
.read_status = aqr_read_status, .read_status = aqr_read_status,
}, },
{ {
.phy_id = PHY_ID_AQR106, PHY_ID_MATCH_MODEL(PHY_ID_AQR106),
.phy_id_mask = 0xfffffff0,
.name = "Aquantia AQR106", .name = "Aquantia AQR106",
.features = PHY_10GBIT_FULL_FEATURES, .features = PHY_10GBIT_FULL_FEATURES,
.aneg_done = genphy_c45_aneg_done, .aneg_done = genphy_c45_aneg_done,
...@@ -145,8 +141,7 @@ static struct phy_driver aqr_driver[] = { ...@@ -145,8 +141,7 @@ static struct phy_driver aqr_driver[] = {
.read_status = aqr_read_status, .read_status = aqr_read_status,
}, },
{ {
.phy_id = PHY_ID_AQR107, PHY_ID_MATCH_MODEL(PHY_ID_AQR107),
.phy_id_mask = 0xfffffff0,
.name = "Aquantia AQR107", .name = "Aquantia AQR107",
.features = PHY_10GBIT_FULL_FEATURES, .features = PHY_10GBIT_FULL_FEATURES,
.aneg_done = genphy_c45_aneg_done, .aneg_done = genphy_c45_aneg_done,
...@@ -156,8 +151,7 @@ static struct phy_driver aqr_driver[] = { ...@@ -156,8 +151,7 @@ static struct phy_driver aqr_driver[] = {
.read_status = aqr_read_status, .read_status = aqr_read_status,
}, },
{ {
.phy_id = PHY_ID_AQR405, PHY_ID_MATCH_MODEL(PHY_ID_AQR405),
.phy_id_mask = 0xfffffff0,
.name = "Aquantia AQR405", .name = "Aquantia AQR405",
.features = PHY_10GBIT_FULL_FEATURES, .features = PHY_10GBIT_FULL_FEATURES,
.aneg_done = genphy_c45_aneg_done, .aneg_done = genphy_c45_aneg_done,
...@@ -171,12 +165,12 @@ static struct phy_driver aqr_driver[] = { ...@@ -171,12 +165,12 @@ static struct phy_driver aqr_driver[] = {
module_phy_driver(aqr_driver); module_phy_driver(aqr_driver);
static struct mdio_device_id __maybe_unused aqr_tbl[] = { static struct mdio_device_id __maybe_unused aqr_tbl[] = {
{ PHY_ID_AQ1202, 0xfffffff0 }, { PHY_ID_MATCH_MODEL(PHY_ID_AQ1202) },
{ PHY_ID_AQ2104, 0xfffffff0 }, { PHY_ID_MATCH_MODEL(PHY_ID_AQ2104) },
{ PHY_ID_AQR105, 0xfffffff0 }, { PHY_ID_MATCH_MODEL(PHY_ID_AQR105) },
{ PHY_ID_AQR106, 0xfffffff0 }, { PHY_ID_MATCH_MODEL(PHY_ID_AQR106) },
{ PHY_ID_AQR107, 0xfffffff0 }, { PHY_ID_MATCH_MODEL(PHY_ID_AQR107) },
{ PHY_ID_AQR405, 0xfffffff0 }, { PHY_ID_MATCH_MODEL(PHY_ID_AQR405) },
{ } { }
}; };
......
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