struct xgpio_instance *chip = platform_get_drvdata(pdev);
of_mm_gpiochip_remove(&chip->mmchip);
- clk_disable_unprepare(chip->clk);
+ if (!pm_runtime_suspended(&pdev->dev))
+ clk_disable(chip->clk);
+ clk_unprepare(chip->clk);
pm_runtime_disable(&pdev->dev);
return 0;
return status;
}
+ pm_runtime_set_active(&pdev->dev);
pm_runtime_enable(&pdev->dev);
- status = pm_runtime_get_sync(&pdev->dev);
- if (status < 0)
- goto err_unprepare_clk;
/* Call the OF gpio helper to setup and register the GPIO device */
status = of_mm_gpiochip_add(np, &chip->mmchip);
if (status) {
pr_err("%pOF: error in probe function with status %d\n",
np, status);
- goto err_pm_put;
+ goto err_unprepare_clk;
}
status = xgpio_irq_setup(np, chip);