mirror of
https://github.com/torvalds/linux.git
synced 2025-04-12 06:49:52 +00:00
irqchip/renesas-rzg2l: Use devm_pm_runtime_enable()
Simplify rzg2l_irqc_common_init() by using devm_pm_runtime_enable(). Signed-off-by: Fabrizio Castro <fabrizio.castro.jz@renesas.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/20250212182034.366167-4-fabrizio.castro.jz@renesas.com
This commit is contained in:
parent
78f384dad0
commit
7de11369ef
@ -568,11 +568,16 @@ static int rzg2l_irqc_common_init(struct device_node *node, struct device_node *
|
||||
return PTR_ERR(resetn);
|
||||
}
|
||||
|
||||
pm_runtime_enable(dev);
|
||||
ret = devm_pm_runtime_enable(dev);
|
||||
if (ret < 0) {
|
||||
dev_err(dev, "devm_pm_runtime_enable failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = pm_runtime_resume_and_get(dev);
|
||||
if (ret < 0) {
|
||||
dev_err(dev, "pm_runtime_resume_and_get failed: %d\n", ret);
|
||||
goto pm_disable;
|
||||
return ret;
|
||||
}
|
||||
|
||||
raw_spin_lock_init(&rzg2l_irqc_data->lock);
|
||||
@ -603,8 +608,7 @@ static int rzg2l_irqc_common_init(struct device_node *node, struct device_node *
|
||||
|
||||
pm_put:
|
||||
pm_runtime_put(dev);
|
||||
pm_disable:
|
||||
pm_runtime_disable(dev);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user