/* Associate the fwnode with the device structure so it *canbelookeduplater
*/
fwnode_handle_get(child);
device_set_node(&phy->mdio.dev, child);
/* All data is now stored in the phy struct; *registerit
*/
rc = phy_device_register(phy); if (rc) {
device_set_node(&phy->mdio.dev, NULL);
fwnode_handle_put(child); return rc;
}
if (is_acpi_node(child)) {
phy->irq = bus->irq[addr];
/* Associate the fwnode with the device structure so it *canbelookeduplater.
*/
phy->mdio.dev.fwnode = fwnode_handle_get(child);
/* All data is now stored in the phy struct, so register it */
rc = phy_device_register(phy); if (rc) {
phy->mdio.dev.fwnode = NULL;
fwnode_handle_put(child); goto clean_phy;
}
} elseif (is_of_node(child)) {
rc = fwnode_mdiobus_phy_device_register(bus, phy, child, addr); if (rc) goto clean_phy;
}
/* phy->mii_ts may already be defined by the PHY driver. A *mii_timestamperprobedviathedevicetreewillstillhave *precedence.
*/ if (mii_ts)
phy->mii_ts = mii_ts;
return0;
unregister_phy: if (is_acpi_node(child) || is_of_node(child))
phy_device_remove(phy);
clean_phy:
phy_device_free(phy);
clean_mii_ts:
unregister_mii_timestamper(mii_ts);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.