From patchwork Mon Mar 1 16:13:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 388729 Delivered-To: patch@linaro.org Received: by 2002:a02:290e:0:0:0:0:0 with SMTP id p14csp3647893jap; Mon, 1 Mar 2021 11:54:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJx4fQrzzP97nB17SECKjNfbLAtU2dL0Xv+x1WS+htZFsUoLcZUSWxtgAH7SR6wcO+Hltn7y X-Received: by 2002:aa7:de8a:: with SMTP id j10mr18420472edv.84.1614628499613; Mon, 01 Mar 2021 11:54:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614628499; cv=none; d=google.com; s=arc-20160816; b=tEih5YaqpKRLWrIeBLHBq2tuN4HhOpi9RjzlT38uE/ClhciEqZ32lZrgbNfNFta/0d IAIxj7eu8V5GOv8a2hqisg8D0oBkyxhLD5RSRLq+VLxAsOVyLj1ROb4TRFlDIx7KhMrX U6uYqGe+xrDWQu3LYHL+36reACr1hdHf2yuVQ4sJNUwj7KYGnIcpX93vyIJi5lH2gqga 7M+JOZ1Ub4Ne+bF0tzPiMZW0pUmETGAyx2oJ2PeIPlAuC5jY7tSRhQsWz3+wWo7WH0JI EiqnO9Qz7Q9mM8q+lWmww6WVqWbUheByYrOI8/Vcbsr59hiCVousazYbmwn2NMlKjW3I kn/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=TZ+rUu/mULYC4Bm7Je1u88dcKvaWiz5uTY5X0lC0DZ4=; b=0mD2ngkIxRe7E8GdMcviMfOHdRv6ScXn6xyxNJgcLy3U0mCFbGU9qq5y3dF0M4khqd xTMIxKPfs2OE/C+2iQse/fFFE7E2QsmGmrHrtpXnztzQKtj3HWN7+SzAsRrSoDl82FGL 6SvlintuH7HM749GLbCQurjKqJI/AmHUa8gQxSq3ZNsSqMVdUttcanpRr/0O2ZCT4wFa 4wJ3k5nvNmCYPrHT3H+Nijqtc2x8XwwZEtJRD7EVzCaGjVvzXAzbK+93Il67Db1QIsBO XXmPxmJ+kEjOYpWJsXEb6m5Qyr/ZDiF0pWt7OO92cx+WnF+hBtSTIL6PRBygcCjQNy+X kgZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wn3sIFMf; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a3si10822092ejd.167.2021.03.01.11.54.59; Mon, 01 Mar 2021 11:54:59 -0800 (PST) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wn3sIFMf; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241853AbhCATwV (ORCPT + 13 others); Mon, 1 Mar 2021 14:52:21 -0500 Received: from mail.kernel.org ([198.145.29.99]:55164 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242166AbhCAToB (ORCPT ); Mon, 1 Mar 2021 14:44:01 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id C484165257; Mon, 1 Mar 2021 17:28:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614619700; bh=dX7ScFUt0rdSyYPxeVINzm8psJX8eoWSmit3uQhjedc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wn3sIFMfaeDoKjU6z/lOO9xPC92D10xUQH03MNXFG8c3rnb5axWMQaoHjadl5Bhwg 4+NdnKBdFnCFrkyuHhTwhcPzReT2Ezy/LCdCAMksmBhUsIP5zR7I0DWZbPCzQhHDUc EuDA+IG6HG5dt86EyvPoWsGPoabBVZ21l3GGzEqE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Marek Szyprowski , Pankaj Dubey , Krzysztof Kozlowski Subject: [PATCH 5.10 549/663] soc: samsung: exynos-asv: dont defer early on not-supported SoCs Date: Mon, 1 Mar 2021 17:13:17 +0100 Message-Id: <20210301161209.034901632@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161141.760350206@linuxfoundation.org> References: <20210301161141.760350206@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Marek Szyprowski commit 0458b88267c637fb872b0359da9ff0b243081e9e 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: 5ea428595cc5 ("soc: samsung: Add Exynos Adaptive Supply Voltage driver") Cc: Signed-off-by: Marek Szyprowski Reviewed-by: Pankaj Dubey Link: https://lore.kernel.org/r/20201207190517.262051-2-krzk@kernel.org Signed-off-by: Krzysztof Kozlowski Signed-off-by: Greg Kroah-Hartman --- drivers/soc/samsung/exynos-asv.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) --- a/drivers/soc/samsung/exynos-asv.c +++ b/drivers/soc/samsung/exynos-asv.c @@ -119,11 +119,6 @@ static int exynos_asv_probe(struct platf 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; @@ -144,6 +139,11 @@ static int exynos_asv_probe(struct platf 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)