@@ -5,7 +5,6 @@
* Copyright (c) 2016 HiSilicon Technologies Co., Ltd.
*/
-#include <linux/clk.h>
#include <linux/iopoll.h>
#include <linux/kernel.h>
#include <linux/module.h>
@@ -21,7 +20,6 @@
#define BIT_WR_DATA_OFFSET 16
struct hisi_femac_mdio_data {
- struct clk *clk;
void __iomem *membase;
};
@@ -93,26 +91,14 @@ static int hisi_femac_mdio_probe(struct platform_device *pdev)
goto err_out_free_mdiobus;
}
- data->clk = devm_clk_get(&pdev->dev, NULL);
- if (IS_ERR(data->clk)) {
- ret = PTR_ERR(data->clk);
- goto err_out_free_mdiobus;
- }
-
- ret = clk_prepare_enable(data->clk);
- if (ret)
- goto err_out_free_mdiobus;
-
ret = of_mdiobus_register(bus, np);
if (ret)
- goto err_out_disable_clk;
+ goto err_out_free_mdiobus;
platform_set_drvdata(pdev, bus);
return 0;
-err_out_disable_clk:
- clk_disable_unprepare(data->clk);
err_out_free_mdiobus:
mdiobus_free(bus);
return ret;
@@ -121,10 +107,8 @@ static int hisi_femac_mdio_probe(struct platform_device *pdev)
static void hisi_femac_mdio_remove(struct platform_device *pdev)
{
struct mii_bus *bus = platform_get_drvdata(pdev);
- struct hisi_femac_mdio_data *data = bus->priv;
mdiobus_unregister(bus);
- clk_disable_unprepare(data->clk);
mdiobus_free(bus);
}