Merge tag 'samsung-drivers-6.19-2-late' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into soc/drivers-late
Samsung SoC drivers for v6.19, part two Two fixes for Exynos PMU (Power Management Unit) driver: 1. Silence lockdep warning being actually a false positive, but quite disturbing during testing. Issue was introduced in v6.18. 2. Drop device refcount when requesting device regmap with exynos_get_pmu_regmap_by_phandle(). Issue was introduced much earlier (around v6.9), with code being rewritten in between. * tag 'samsung-drivers-6.19-2-late' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: soc: samsung: exynos-pmu: fix device leak on regmap lookup soc: samsung: exynos-pmu: Fix structure initialization Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
@@ -346,6 +346,8 @@ struct regmap *exynos_get_pmu_regmap_by_phandle(struct device_node *np,
|
||||
if (!dev)
|
||||
return ERR_PTR(-EPROBE_DEFER);
|
||||
|
||||
put_device(dev);
|
||||
|
||||
return syscon_node_to_regmap(pmu_np);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(exynos_get_pmu_regmap_by_phandle);
|
||||
@@ -585,10 +587,6 @@ static int setup_cpuhp_and_cpuidle(struct device *dev)
|
||||
if (!pmu_context->in_cpuhp)
|
||||
return -ENOMEM;
|
||||
|
||||
raw_spin_lock_init(&pmu_context->cpupm_lock);
|
||||
pmu_context->sys_inreboot = false;
|
||||
pmu_context->sys_insuspend = false;
|
||||
|
||||
/* set PMU to power on */
|
||||
for_each_online_cpu(cpu)
|
||||
gs101_cpuhp_pmu_online(cpu);
|
||||
@@ -657,6 +655,9 @@ static int exynos_pmu_probe(struct platform_device *pdev)
|
||||
|
||||
pmu_context->pmureg = regmap;
|
||||
pmu_context->dev = dev;
|
||||
raw_spin_lock_init(&pmu_context->cpupm_lock);
|
||||
pmu_context->sys_inreboot = false;
|
||||
pmu_context->sys_insuspend = false;
|
||||
|
||||
if (pmu_context->pmu_data && pmu_context->pmu_data->pmu_cpuhp) {
|
||||
ret = setup_cpuhp_and_cpuidle(dev);
|
||||
|
||||
Reference in New Issue
Block a user