9
0
Fork 0

net: phy: mdio-mvebu: Make the clock property required

This property is wrongly documented as 'optional', although all the
ethernet units need a clock to be enabled in order to access the MDIO
interface. For that reason, this commit makes the property a required
one and fails to probe the device, when a clock is not properly provided.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Ezequiel Garcia 2014-07-29 17:44:57 -03:00 committed by Sascha Hauer
parent 889105eee0
commit f81c936cc8
1 changed files with 4 additions and 4 deletions

View File

@ -117,8 +117,9 @@ static int mvebu_mdio_probe(struct device_d *dev)
return -ENOMEM;
priv->clk = clk_get(dev, NULL);
if (!IS_ERR(priv->clk))
clk_enable(priv->clk);
if (IS_ERR(priv->clk))
return PTR_ERR(priv->clk);
clk_enable(priv->clk);
priv->miibus.dev.device_node = dev->device_node;
priv->miibus.priv = priv;
@ -135,8 +136,7 @@ static void mvebu_mdio_remove(struct device_d *dev)
mdiobus_unregister(&priv->miibus);
if (!IS_ERR(priv->clk))
clk_disable(priv->clk);
clk_disable(priv->clk);
}
static struct of_device_id mvebu_mdio_dt_ids[] = {