|
@@ -1840,7 +1840,6 @@ fec_probe(struct platform_device *pdev)
|
|
|
struct resource *r;
|
|
|
const struct of_device_id *of_id;
|
|
|
static int dev_id;
|
|
|
- struct regulator *reg_phy;
|
|
|
|
|
|
of_id = of_match_device(fec_dt_ids, &pdev->dev);
|
|
|
if (of_id)
|
|
@@ -1919,9 +1918,9 @@ fec_probe(struct platform_device *pdev)
|
|
|
clk_prepare_enable(fep->clk_enet_out);
|
|
|
clk_prepare_enable(fep->clk_ptp);
|
|
|
|
|
|
- reg_phy = devm_regulator_get(&pdev->dev, "phy");
|
|
|
- if (!IS_ERR(reg_phy)) {
|
|
|
- ret = regulator_enable(reg_phy);
|
|
|
+ fep->reg_phy = devm_regulator_get(&pdev->dev, "phy");
|
|
|
+ if (!IS_ERR(fep->reg_phy)) {
|
|
|
+ ret = regulator_enable(fep->reg_phy);
|
|
|
if (ret) {
|
|
|
dev_err(&pdev->dev,
|
|
|
"Failed to enable phy regulator: %d\n", ret);
|