|
@@ -449,10 +449,9 @@ static int davinci_mdio_suspend(struct device *dev)
|
|
|
__raw_writel(ctrl, &data->regs->control);
|
|
|
wait_for_idle(data);
|
|
|
|
|
|
- pm_runtime_put_sync(data->dev);
|
|
|
-
|
|
|
data->suspended = true;
|
|
|
spin_unlock(&data->lock);
|
|
|
+ pm_runtime_put_sync(data->dev);
|
|
|
|
|
|
return 0;
|
|
|
}
|
|
@@ -462,9 +461,9 @@ static int davinci_mdio_resume(struct device *dev)
|
|
|
struct davinci_mdio_data *data = dev_get_drvdata(dev);
|
|
|
u32 ctrl;
|
|
|
|
|
|
- spin_lock(&data->lock);
|
|
|
pm_runtime_get_sync(data->dev);
|
|
|
|
|
|
+ spin_lock(&data->lock);
|
|
|
/* restart the scan state machine */
|
|
|
ctrl = __raw_readl(&data->regs->control);
|
|
|
ctrl |= CONTROL_ENABLE;
|