From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DFD151482E8; Fri, 9 Jan 2026 12:51:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767963067; cv=none; b=QOkYiDwF79nmPwFh0o8YTid8Au+RhvZZHZJfunaQpCuoXNcykmwu+gfcuu3T/BVNrSkxgwxBtoBTFTAzshHqmIC4rYqk+2twFxsTxtDMSfS8HK6XtoD4K0OhA2uXLdkABVzWkUu5G4dIt6yClJ3YgHrNafb3XHvplvJGWCng3p8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767963067; c=relaxed/simple; bh=W3dKOcuJw2JX9vgqQEXzFHlTX+/ehyCAZfEX75vsr/Q=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=JYtsiW0MncgI1bA+Qk79Z+F9XzmfynC9yqY1B6JhnUvrlGrOk9Cu79mzZ7WgQL/G8vPzxdghUkSLc+g9R+PSvUyxgcOcRi00LFR8ouvwlCW6vTjPBNdmGBT0r3ozl/KtHCsBIouJ/5adrlnO07Uwv1VBVr6uUP8EqKQXNppJ1W8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=M+nAIMrw; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="M+nAIMrw" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6AFF1C4CEF1; Fri, 9 Jan 2026 12:51:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1767963067; bh=W3dKOcuJw2JX9vgqQEXzFHlTX+/ehyCAZfEX75vsr/Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=M+nAIMrwnYc5RGOfOvYNw1Ewj0JmIYKtNJ9iqX7nhdPe6kQp2TZfZuGNRq0785xeb hme5LLf+89CxvRZzV/IIljWAbsB52k9jmd8jBSyPHumaNYOQVJzEOaUWL1Stu1Vvnx KDEJvakU1ggzT0hyyqjiavNDOzGqYzKTcrUy2m/Y= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Rob Herring , Ulf Hansson , Sasha Levin Subject: [PATCH 6.1 585/634] pmdomain: Use device_get_match_data() Date: Fri, 9 Jan 2026 12:44:23 +0100 Message-ID: <20260109112139.629660773@linuxfoundation.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260109112117.407257400@linuxfoundation.org> References: <20260109112117.407257400@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Rob Herring [ Upstream commit 3ba9fdfaa550936837b50b73d6c27ac401fde875 ] Use preferred device_get_match_data() instead of of_match_device() to get the driver match data. With this, adjust the includes to explicitly include the correct headers. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20231006224614.444488-1-robh@kernel.org Signed-off-by: Ulf Hansson Stable-dep-of: 73cb5f6eafb0 ("pmdomain: imx: Fix reference count leak in imx_gpc_probe()") Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/soc/actions/owl-sps.c | 16 +++++----------- drivers/soc/imx/gpc.c | 7 +++---- drivers/soc/rockchip/pm_domains.c | 13 ++++--------- 3 files changed, 12 insertions(+), 24 deletions(-) --- a/drivers/soc/actions/owl-sps.c +++ b/drivers/soc/actions/owl-sps.c @@ -8,8 +8,10 @@ * Copyright (c) 2017 Andreas Färber */ +#include #include -#include +#include +#include #include #include #include @@ -96,24 +98,16 @@ static int owl_sps_init_domain(struct ow static int owl_sps_probe(struct platform_device *pdev) { - const struct of_device_id *match; const struct owl_sps_info *sps_info; struct owl_sps *sps; int i, ret; - if (!pdev->dev.of_node) { - dev_err(&pdev->dev, "no device node\n"); - return -ENODEV; - } - - match = of_match_device(pdev->dev.driver->of_match_table, &pdev->dev); - if (!match || !match->data) { + sps_info = device_get_match_data(&pdev->dev); + if (!sps_info) { dev_err(&pdev->dev, "unknown compatible or missing data\n"); return -EINVAL; } - sps_info = match->data; - sps = devm_kzalloc(&pdev->dev, struct_size(sps, domains, sps_info->num_domains), GFP_KERNEL); --- a/drivers/soc/imx/gpc.c +++ b/drivers/soc/imx/gpc.c @@ -7,9 +7,10 @@ #include #include #include -#include +#include #include #include +#include #include #include @@ -403,9 +404,7 @@ clk_err: static int imx_gpc_probe(struct platform_device *pdev) { - const struct of_device_id *of_id = - of_match_device(imx_gpc_dt_ids, &pdev->dev); - const struct imx_gpc_dt_data *of_id_data = of_id->data; + const struct imx_gpc_dt_data *of_id_data = device_get_match_data(&pdev->dev); struct device_node *pgc_node; struct regmap *regmap; void __iomem *base; --- a/drivers/soc/rockchip/pm_domains.c +++ b/drivers/soc/rockchip/pm_domains.c @@ -9,11 +9,13 @@ #include #include #include +#include #include #include +#include +#include #include #include -#include #include #include #include @@ -770,7 +772,6 @@ static int rockchip_pm_domain_probe(stru struct device_node *node; struct device *parent; struct rockchip_pmu *pmu; - const struct of_device_id *match; const struct rockchip_pmu_info *pmu_info; int error; @@ -779,13 +780,7 @@ static int rockchip_pm_domain_probe(stru return -ENODEV; } - match = of_match_device(dev->driver->of_match_table, dev); - if (!match || !match->data) { - dev_err(dev, "missing pmu data\n"); - return -EINVAL; - } - - pmu_info = match->data; + pmu_info = device_get_match_data(dev); pmu = devm_kzalloc(dev, struct_size(pmu, domains, pmu_info->num_domains),