Browse Source

net: phy: at803x: Add a definition for PHY ID mask

Add a definition for PHY ID mask for improving code readability.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Fabio Estevam 8 years ago
parent
commit
58effd7168
1 changed files with 7 additions and 6 deletions
  1. 7 6
      drivers/net/phy/at803x.c

+ 7 - 6
drivers/net/phy/at803x.c

@@ -58,6 +58,7 @@
 #define ATH8030_PHY_ID 0x004dd076
 #define ATH8030_PHY_ID 0x004dd076
 #define ATH8031_PHY_ID 0x004dd074
 #define ATH8031_PHY_ID 0x004dd074
 #define ATH8035_PHY_ID 0x004dd072
 #define ATH8035_PHY_ID 0x004dd072
+#define AT803X_PHY_ID_MASK			0xffffffef
 
 
 MODULE_DESCRIPTION("Atheros 803x PHY driver");
 MODULE_DESCRIPTION("Atheros 803x PHY driver");
 MODULE_AUTHOR("Matus Ujhelyi");
 MODULE_AUTHOR("Matus Ujhelyi");
@@ -386,7 +387,7 @@ static struct phy_driver at803x_driver[] = {
 	/* ATHEROS 8035 */
 	/* ATHEROS 8035 */
 	.phy_id			= ATH8035_PHY_ID,
 	.phy_id			= ATH8035_PHY_ID,
 	.name			= "Atheros 8035 ethernet",
 	.name			= "Atheros 8035 ethernet",
-	.phy_id_mask		= 0xffffffef,
+	.phy_id_mask		= AT803X_PHY_ID_MASK,
 	.probe			= at803x_probe,
 	.probe			= at803x_probe,
 	.config_init		= at803x_config_init,
 	.config_init		= at803x_config_init,
 	.set_wol		= at803x_set_wol,
 	.set_wol		= at803x_set_wol,
@@ -403,7 +404,7 @@ static struct phy_driver at803x_driver[] = {
 	/* ATHEROS 8030 */
 	/* ATHEROS 8030 */
 	.phy_id			= ATH8030_PHY_ID,
 	.phy_id			= ATH8030_PHY_ID,
 	.name			= "Atheros 8030 ethernet",
 	.name			= "Atheros 8030 ethernet",
-	.phy_id_mask		= 0xffffffef,
+	.phy_id_mask		= AT803X_PHY_ID_MASK,
 	.probe			= at803x_probe,
 	.probe			= at803x_probe,
 	.config_init		= at803x_config_init,
 	.config_init		= at803x_config_init,
 	.link_change_notify	= at803x_link_change_notify,
 	.link_change_notify	= at803x_link_change_notify,
@@ -421,7 +422,7 @@ static struct phy_driver at803x_driver[] = {
 	/* ATHEROS 8031 */
 	/* ATHEROS 8031 */
 	.phy_id			= ATH8031_PHY_ID,
 	.phy_id			= ATH8031_PHY_ID,
 	.name			= "Atheros 8031 ethernet",
 	.name			= "Atheros 8031 ethernet",
-	.phy_id_mask		= 0xffffffef,
+	.phy_id_mask		= AT803X_PHY_ID_MASK,
 	.probe			= at803x_probe,
 	.probe			= at803x_probe,
 	.config_init		= at803x_config_init,
 	.config_init		= at803x_config_init,
 	.set_wol		= at803x_set_wol,
 	.set_wol		= at803x_set_wol,
@@ -439,9 +440,9 @@ static struct phy_driver at803x_driver[] = {
 module_phy_driver(at803x_driver);
 module_phy_driver(at803x_driver);
 
 
 static struct mdio_device_id __maybe_unused atheros_tbl[] = {
 static struct mdio_device_id __maybe_unused atheros_tbl[] = {
-	{ ATH8030_PHY_ID, 0xffffffef },
-	{ ATH8031_PHY_ID, 0xffffffef },
-	{ ATH8035_PHY_ID, 0xffffffef },
+	{ ATH8030_PHY_ID, AT803X_PHY_ID_MASK },
+	{ ATH8031_PHY_ID, AT803X_PHY_ID_MASK },
+	{ ATH8035_PHY_ID, AT803X_PHY_ID_MASK },
 	{ }
 	{ }
 };
 };