[ 169.855161] WARNING: at fs/sysfs/dir.c:530 sysfs_adl@one28x7/ 0x9c()
[ 169.855236] sysfs: cannot create duplicate filename '/devices/
ff290000.eth/stmmac-0:00/phy_reg'
return 0;
}
+int gmac_remove_sysfs(struct phy_device * phy_dev) {
+ int t;
+
+ for (t = 0; t < ARRAY_SIZE(phy_reg_attrs); t++) {
+ device_remove_file(&phy_dev->dev,&phy_reg_attrs[t]);
+ }
+
+ return 0;
+}
+
/**
* stmmac_init_phy - PHY initialization
* @dev: net device structure
/* Stop and disconnect the PHY */
if (priv->phydev) {
+
+ gmac_remove_sysfs(priv->phydev);
+
phy_stop(priv->phydev);
phy_disconnect(priv->phydev);
priv->phydev = NULL;