mirror of
https://github.com/torvalds/linux.git
synced 2026-12-02 03:22:37 +00:00
irqchip/renesas-rzv2h: Use devm_pm_runtime_enable()
Simplify rzv2h_icu_init() by using devm_pm_runtime_enable(). Signed-off-by: Biju Das <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Philipp Zabel <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Link: https://lore.kernel.org/all/[email protected]
This commit is contained in:
committed by
Thomas Gleixner
parent
ad773ebc6e
commit
5ec8cabc3b
@@ -468,11 +468,16 @@ static int rzv2h_icu_init(struct device_node *node, struct device_node *parent)
|
||||
return ret;
|
||||
}
|
||||
|
||||
pm_runtime_enable(&pdev->dev);
|
||||
ret = devm_pm_runtime_enable(&pdev->dev);
|
||||
if (ret < 0) {
|
||||
dev_err(&pdev->dev, "devm_pm_runtime_enable failed, %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = pm_runtime_resume_and_get(&pdev->dev);
|
||||
if (ret < 0) {
|
||||
dev_err(&pdev->dev, "pm_runtime_resume_and_get failed: %d\n", ret);
|
||||
goto pm_disable;
|
||||
return ret;
|
||||
}
|
||||
|
||||
raw_spin_lock_init(&rzv2h_icu_data->lock);
|
||||
@@ -493,8 +498,6 @@ static int rzv2h_icu_init(struct device_node *node, struct device_node *parent)
|
||||
|
||||
pm_put:
|
||||
pm_runtime_put(&pdev->dev);
|
||||
pm_disable:
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user