From patchwork Fri Jul 9 21:07:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 471898 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp667844jao; Fri, 9 Jul 2021 14:07:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzEJKCL/0FPV7PX3Ace/7O5UkqjI7EYJZBBLNKIF6cw7YXcITcvNiMTlm+t3XsFyzp8bFAH X-Received: by 2002:a92:c0cc:: with SMTP id t12mr13433141ilf.47.1625864867980; Fri, 09 Jul 2021 14:07:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625864867; cv=none; d=google.com; s=arc-20160816; b=Tert4wUAL6VszIDZVn0RhhvRZNAdG7hOTpC/ZeA8yn9X1sdKimrnGiNnZ/qKei1Kw/ Xh9EqddXwz1aft6mGe6+7s2xKhePqKET12S3YuhbtPtFY+/ujib4uhuX/SF8o62hzyo9 s7xiNJ2uBi2UaXBFBlJRbVME5nIrrXf8vYzePCXSMG8rtjwmgtkrmKUZm1Y5x9T1fjgQ yR6S7FNZjiw3z+ZqI1gSoMJSFb5s13jsmokKSgWjliH9/CGrCJbge7GrkA41RqwjLGkm Qr9fGZRXO0hN9PsGxlL+4qy5LvV9RsqAtfNv/ujref2JBLsrHE1g7fVnFkelxcHp+BK9 OncA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=XL+YXT/rgnuTxArH7cCESmmrm7QQBuc6KIaqBz76zOw=; b=NpP+4qp2BsjrLfqAUa7xn8Aj/zPMgweKEAG2vQ/n6MDjhB8Hyu6j3+l/8w4Bq07H2w ch8rdJDzcYbQcu1YVyviPMn2R9toMhJ5SCe6CePUyoi8dAdBYkLM/ALuoY68P6Sc9I2r IfYkdATxF/CBlVqZHoULjuWN4pX2BNeXZd2HyQNmQtY/+YYMSCEBBsxB0tX59+2Krs/r Etm6g+B9/U//YmMWXVfU4rSslAquvFmb/QsmHeVvMzIoJ+uwqEqRv7NTLiVtTW8BlYaX D/hIrBB7EEVlrJGNfKbRPgUeWVcUtSA2v//Mo3qfWal+NkbNMmUVc/rfSiLDuUxdEFJo HFFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zo8nKP9L; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j23si7548681iog.79.2021.07.09.14.07.47; Fri, 09 Jul 2021 14:07:47 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-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=@linaro.org header.s=google header.b=zo8nKP9L; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230401AbhGIVK2 (ORCPT + 7 others); Fri, 9 Jul 2021 17:10:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230425AbhGIVKZ (ORCPT ); Fri, 9 Jul 2021 17:10:25 -0400 Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08AC0C0613E5 for ; Fri, 9 Jul 2021 14:07:40 -0700 (PDT) Received: by mail-lj1-x22f.google.com with SMTP id b40so10091636ljf.12 for ; Fri, 09 Jul 2021 14:07:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XL+YXT/rgnuTxArH7cCESmmrm7QQBuc6KIaqBz76zOw=; b=zo8nKP9LqCEewAlV/Hpu705xkphyemres9xFnaNIhUAeh5mFF+U0np4R+XJnnoxHCQ nfLpLUlEwcCDnPG4JheD5q7zX5smYjcU/iCf/209AbhbXsrNlVqfHEqvR/vajcEp6oKD WYJXijKB69beBXlThUmduFE8T/qf7LjLlS85ShhqYwJZn0cGjroWaxrrTkUlHrdkCSlN F0hzw7/KZgkyr0DOwglSb2K5Kdnm7jTsAVipJZJZjfLHFM6291qnng+V5NCAtZJAKdZl j5u/CNTmsoTEkg1kZuODwOAifNj/RP2nEMglu41qEwgxP0qy7Q3u0SWpflP+87EVQVIY aGEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XL+YXT/rgnuTxArH7cCESmmrm7QQBuc6KIaqBz76zOw=; b=tP5mXnG7P/PcP4yZUSpZpcl8S0uk6bfrat/j+ANUB5U9UUA8xnzCtIplN4nUC7hREU Hph7nh4fiP0OKUenQubSBJxWo3twUsSVXbUekfgJjPmJIYyzv20MFcVmao3Bvk9wHwT5 waHd/+eTEa0sSsXQzm7uAcMTOsx+05Cfk2cxFbAWuXt1GKNpXJ+0zw/aS41AnN8OT5Nk ARGWGa6KzrspP/Ir42iJXP1h4CKC8QwlUMYmAYfxD2n9qvpYz9J5eyRysE6vonbEm32s jBcM07Whpw+zTG2NVIgQPeec6UAiTkYGHa6ziXQjq6cOucRhQKeIvnAZVxFTRGQkOCjO mhcg== X-Gm-Message-State: AOAM531uQko3jpN9mi+1cO9mLbzqQ4OCZ/SSsIq3/9n1m6WYzqJqFWD5 rZX+I4p+5SCpZPXvh41auWVp6w== X-Received: by 2002:a2e:9e53:: with SMTP id g19mr32140951ljk.58.1625864858423; Fri, 09 Jul 2021 14:07:38 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id n15sm590625lfh.70.2021.07.09.14.07.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Jul 2021 14:07:37 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Rob Clark , Sean Paul , Abhinav Kumar , Rob Herring Cc: Jonathan Marek , Stephen Boyd , David Airlie , Daniel Vetter , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, devicetree@vger.kernel.org Subject: [PATCH v2 7/8] drm/msm/dsi: phy: use of_device_get_match_data Date: Sat, 10 Jul 2021 00:07:28 +0300 Message-Id: <20210709210729.953114-8-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210709210729.953114-1-dmitry.baryshkov@linaro.org> References: <20210709210729.953114-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Use of_device_get_match-data() instead of of_match_node(). Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar --- drivers/gpu/drm/msm/dsi/phy/dsi_phy.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) -- 2.30.2 diff --git a/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c b/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c index 952fd0b95865..c76a6438ffb9 100644 --- a/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c +++ b/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c @@ -625,17 +625,12 @@ static int dsi_phy_driver_probe(struct platform_device *pdev) { struct msm_dsi_phy *phy; struct device *dev = &pdev->dev; - const struct of_device_id *match; int ret; phy = devm_kzalloc(dev, sizeof(*phy), GFP_KERNEL); if (!phy) return -ENOMEM; - match = of_match_node(dsi_phy_dt_match, dev->of_node); - if (!match) - return -ENODEV; - phy->provided_clocks = devm_kzalloc(dev, struct_size(phy->provided_clocks, hws, NUM_PROVIDED_CLKS), GFP_KERNEL); @@ -644,7 +639,10 @@ static int dsi_phy_driver_probe(struct platform_device *pdev) phy->provided_clocks->num = NUM_PROVIDED_CLKS; - phy->cfg = match->data; + phy->cfg = of_device_get_match_data(&pdev->dev); + if (!phy->cfg) + return -ENODEV; + phy->pdev = pdev; phy->id = dsi_phy_get_id(phy);