@@ -378,7 +378,7 @@ static int amba_pm_runtime_suspend(struct device *dev)
int ret = pm_generic_runtime_suspend(dev);
if (ret == 0 && dev->driver)
- clk_disable(pcdev->pclk);
+ amba_pclk_disable(pcdev);
return ret;
}
@@ -388,8 +388,8 @@ static int amba_pm_runtime_resume(struct device *dev)
struct amba_device *pcdev = to_amba_device(dev);
int ret;
- if (dev->driver) {
- ret = clk_enable(pcdev->pclk);
+ if (dev->driver && !IS_ERR(pcdev->pclk)) {
+ ret = amba_pclk_enable(pcdev->pclk);
/* Failure is probably fatal to the system, but... */
if (ret)
return ret;