Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4004208pxb; Tue, 2 Mar 2021 04:26:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJxVMyhdNTJ4P1EfP5G6MeUoxGNph1PENZh0oIpbF9cjjEVnUw7n9j1ASwXoXwlj0tvqyPsL X-Received: by 2002:aa7:df14:: with SMTP id c20mr10971876edy.197.1614688017546; Tue, 02 Mar 2021 04:26:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614688017; cv=none; d=google.com; s=arc-20160816; b=x8QWB+hOElg15h1DKfoxhH+IvbCvNCuy+ELDpAxi6wCkJWk9LDtD3DyAy4y+9yF2P6 wnVwZEftmnsU85bjh2/nRB/7NCTH9NEXv5bwlm+yuLcX3HHenG5UN5WxKLXcBVMiW1n4 21JkRKtHGODRStHdlzaKEJjYdd2B/nvKwKCV2/F3UGoYdon2tZPoZR+xm7S5gQrdi3t+ 97aNqGbeJPmxsUBX1ZXUhXFqKZjlBNXBFtAPPYVYYqhuUvNOMUDu54tQYdxJEJWWhlMQ zBKu12Ebz/uhEt9RRwGzcyzVHxQRYq09a8cHs6aX3TwaJUx+FF8Rmq///S9bJRS/vkco iOJQ== 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=zZGyHt5e9NFFHwwUL9T+fFmTIP6JdIwKaUfnkNzOqo1oiSYDEDtinlY3mGtstMf9LU Eem5gWjMYT1qGi8rpnbcy6MCuOFxU5PjnolpuLYZ4wD0Z2lAtm1fa2IGr/wdfol5xUf9 nLA2kVXr0/nr1QO2tvUroFdBRmjpkEJ7UDXVo2nwwdaoM0K5cP2Ykd3HSDxyjg0OAgHi NqFCwLdDOOFmTljCnah9TMVPw4aMviP1/8lkMZRAqg2pAyl5Oq34tUW2MEXy6ryXrLkh 6PbOJcY1mxXvZKmDzHPYDtTR+SgQznrdnjGG2B2lRwNf7dVaddxjAC6Gyuc8KKTHJRdg +XSw== 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 linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 zh8si12206451ejb.419.2021.03.02.04.26.31; Tue, 02 Mar 2021 04:26:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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 linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 S1442721AbhCBCPm (ORCPT + 99 others); Mon, 1 Mar 2021 21:15:42 -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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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)