/** * mdiobus_setup_mdiodev_from_board_info - create and setup MDIO devices * from pre-collected board specific MDIO information * @bus: Bus the board_info belongs to * @cb: Callback to create device on bus * Context: can sleep
*/ void mdiobus_setup_mdiodev_from_board_info(struct mii_bus *bus, int (*cb)
(struct mii_bus *bus, struct mdio_board_info *bi))
{ struct mdio_board_entry *be, *tmp;
/** * mdiobus_register_board_info - register MDIO devices for a given board * @info: array of devices descriptors * @n: number of descriptors provided * Context: can sleep * * The board info passed can be marked with __initdata but be pointers * such as platform_data etc. are copied as-is
*/ int mdiobus_register_board_info(conststruct mdio_board_info *info, unsignedint n)
{ struct mdio_board_entry *be;
be = kcalloc(n, sizeof(*be), GFP_KERNEL); if (!be) return -ENOMEM;
for (int i = 0; i < n; i++, be++) {
be->board_info = info[i];
mutex_lock(&mdio_board_lock);
list_add_tail(&be->list, &mdio_board_list);
mutex_unlock(&mdio_board_lock);
}
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.