Use devm_* API for memory allocation and to get device's clock
to simplify driver's code.
Signed-off-by: Grygorii Strashko <grygorii.strashko@xxxxxx>
---
drivers/net/ethernet/ti/davinci_mdio.c | 21 ++++-----------------
1 file changed, 4 insertions(+), 17 deletions(-)
diff --git a/drivers/net/ethernet/ti/davinci_mdio.c b/drivers/net/ethernet/ti/davinci_mdio.c[...]
index 0cca9de..f0f7128 100644
--- a/drivers/net/ethernet/ti/davinci_mdio.c
+++ b/drivers/net/ethernet/ti/davinci_mdio.c
@@ -425,16 +417,11 @@ static int davinci_mdio_remove(struct platform_device *pdev)
if (data->bus) {
mdiobus_unregister(data->bus);
- mdiobus_free(data->bus);
}