Skip to content

Commit

Permalink
soc: samsung: exynos-asv: don't defer early on not-supported SoCs
Browse files Browse the repository at this point in the history
commit 0458b88 upstream.

Check if the SoC is really supported before gathering the needed
resources. This fixes endless deferred probe on some SoCs other than
Exynos5422 (like Exynos5410).

Fixes: 5ea4285 ("soc: samsung: Add Exynos Adaptive Supply Voltage driver")
Cc: <stable@vger.kernel.org>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Pankaj Dubey <pankaj.dubey@samsung.com>
Link: https://lore.kernel.org/r/20201207190517.262051-2-krzk@kernel.org
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
mszyprow authored and gregkh committed Mar 4, 2021
1 parent 7f422fb commit fb4f745
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions drivers/soc/samsung/exynos-asv.c
Expand Up @@ -119,11 +119,6 @@ static int exynos_asv_probe(struct platform_device *pdev)
u32 product_id = 0;
int ret, i;

cpu_dev = get_cpu_device(0);
ret = dev_pm_opp_get_opp_count(cpu_dev);
if (ret < 0)
return -EPROBE_DEFER;

asv = devm_kzalloc(&pdev->dev, sizeof(*asv), GFP_KERNEL);
if (!asv)
return -ENOMEM;
Expand All @@ -144,6 +139,11 @@ static int exynos_asv_probe(struct platform_device *pdev)
return -ENODEV;
}

cpu_dev = get_cpu_device(0);
ret = dev_pm_opp_get_opp_count(cpu_dev);
if (ret < 0)
return -EPROBE_DEFER;

ret = of_property_read_u32(pdev->dev.of_node, "samsung,asv-bin",
&asv->of_bin);
if (ret < 0)
Expand Down

0 comments on commit fb4f745

Please sign in to comment.