Unverified Commit c665b354 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!10202 net: dsa: seville: register the mdiobus under devres

parents a0f4a901 cacddb49
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1092,7 +1092,7 @@ static int vsc9953_mdio_bus_alloc(struct ocelot *ocelot)
	snprintf(bus->id, MII_BUS_ID_SIZE, "%s-imdio", dev_name(dev));

	/* Needed in order to initialize the bus mutex lock */
	rc = mdiobus_register(bus);
	rc = devm_mdiobus_register(dev, bus);
	if (rc < 0) {
		dev_err(dev, "failed to register MDIO bus\n");
		return rc;
@@ -1144,7 +1144,8 @@ static void vsc9953_mdio_bus_free(struct ocelot *ocelot)
		mdio_device_free(pcs->mdio);
		lynx_pcs_destroy(pcs);
	}
	mdiobus_unregister(felix->imdio);

	 /* mdiobus_unregister and mdiobus_free handled by devres */
}

static void vsc9953_xmit_template_populate(struct ocelot *ocelot, int port)