linux_dsm_epyc7002/drivers/net/ethernet/mediatek
Sean Wang 1e515b7fdb net: ethernet: mediatek: use devm_mdiobus_alloc instead of mdiobus_alloc inside mtk_mdio_init
a lot of parts in the driver uses devm_* APIs to gain benefits from the
device resource management, so devm_mdiobus_alloc is also used instead
of mdiobus_alloc to have more elegant code flow.

Using common code provided by the devm_* helps to
1) have simplified the code flow as [1] says
2) decrease the risk of incorrect error handling by human
3) only a few drivers used it since it was proposed on linux 3.16,
so just hope to promote for this.

Ref:
[1] https://patchwork.ozlabs.org/patch/344093/

Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-31 20:53:48 -07:00
..
Kconfig net-next: mediatek: add Kconfig and Makefile 2016-03-10 16:22:12 -05:00
Makefile net-next: mediatek: add Kconfig and Makefile 2016-03-10 16:22:12 -05:00
mtk_eth_soc.c net: ethernet: mediatek: use devm_mdiobus_alloc instead of mdiobus_alloc inside mtk_mdio_init 2016-08-31 20:53:48 -07:00
mtk_eth_soc.h net: ethernet: mediatek: fix incorrect return value of devm_clk_get with EPROBE_DEFER 2016-08-31 20:53:47 -07:00