Received: by 2002:a05:7412:b101:b0:e2:908c:2ebd with SMTP id az1csp2870785rdb; Wed, 15 Nov 2023 13:05:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IGLUXkGa7GN6vYmUri7GjjKSSBEGJ1bV2dsI9+Aa5F6g9kzVwUSiFgUmLSVtqXjNvIv7I36 X-Received: by 2002:ac8:5d86:0:b0:41e:279d:ddc0 with SMTP id d6-20020ac85d86000000b0041e279dddc0mr7653035qtx.40.1700082359671; Wed, 15 Nov 2023 13:05:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700082359; cv=none; d=google.com; s=arc-20160816; b=qYJ+WB/7/XHq2HQqXuVYOR4Z9MoGYDHI8hovmoBn36uSoOK/5KILnxO9/oXEm8QvcD 88eHFmqC0eqVLH0F/iN+7P6FyDsBgtB254MffjMQGZKGr7FUXkz6cZ1h6fDW3Wsurstv XpMO4de4WxYu4kPHKbU27Yuyy/wIS8I3juFspn7WhEPtI9gqnIMNqgDLZQYW12x4kT+S fLwhafukxYXJ9v4dqUKKk4H0EM8rEjuSNy4l0uNEPJ7nnnpRSykDL+5PKOmdxKn/moeY bK41sfNuPS/y+BalMf/hiyY7Gd7H9Bb/ROThb27naBosfwme2iHKgZsPds7pJ/WcG75g W66Q== 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 :message-id:date:subject:cc:to:from; bh=TOxsynhRcsQpspET2rGRXcJTfs3kg/OnXXBbiAJArDQ=; fh=oPb0qFD19D5JVeoaV81kHZLHdDFwf5sA/nM2sCAfMGY=; b=x2ILa4NA63TkgVIXta9FKSTJLYpSQm5q5pUhT6XtEBIigQAXscB3YS/dRA5ryBBF/D MOpPagUvxJwTrm2ZIzhc//0TURWqf62fxyM0kHbx/ci3MY7ISVXPub71Hxw3skW0r9CH nKl38lWNmVn3k8CbfUFp/xlv1MblESwPXDXDf6SIJoYBfP/vus9woEcXVnxwLUEAO2GL U5sJNDglsXKgTqcpQqMA4PSw8aLeECELC0QQHaOuKP9qB7JaVTKz3v6dGaC4IKsNOT1b 7dsbIgX49K/xkK2/V53V+evjCR3sNz7cMICEzoO8IJg04qc1FI9ukwGw04q/E+bYB529 TADA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id n4-20020a05622a11c400b0041808244656si9430148qtk.313.2023.11.15.13.05.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 13:05:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 2FA1E807405B; Wed, 15 Nov 2023 13:05:08 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344791AbjKOVER (ORCPT + 99 others); Wed, 15 Nov 2023 16:04:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344976AbjKOVDy (ORCPT ); Wed, 15 Nov 2023 16:03:54 -0500 Received: from mail-ot1-f46.google.com (mail-ot1-f46.google.com [209.85.210.46]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 424B2198A for ; Wed, 15 Nov 2023 13:03:27 -0800 (PST) Received: by mail-ot1-f46.google.com with SMTP id 46e09a7af769-6ce2eaf7c2bso57303a34.0 for ; Wed, 15 Nov 2023 13:03:27 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700082206; x=1700687006; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=TOxsynhRcsQpspET2rGRXcJTfs3kg/OnXXBbiAJArDQ=; b=dY+t5j+hLHYt/lLZLfBwshbsBd4ETEpBXGPArBaATBQ9PslcN4VtxWPnCyGTmuNvTu RFvFAqnFS5spjo/a7udSIO4FQsmb1skDf6suOKWUMIxdKpH1/WcbwJK0IM4SOs8Ab/yt mIYZEudx2qpmWjQpamdsypnV6KWJSNeIZRgR9d2LUhIU588q3SjDGo4sEkGIwMfYpb4z KjANBP6N/FuVtTPqLtByh+b0q0gz88sCrehstOc5djZEPdApNf2XXc3ARDNh6fCsBG5C VWhrV1eQCCk1aKymFmJ3D9BnxK+o6F0FqZCHEPG1IKnJt0pyJZV31Mh4FO5qoEGt/hTM 7KQQ== X-Gm-Message-State: AOJu0YwIoDKD6C6yenngDxfBuv2r51LAiPP+vIqQoKUcvY/+4utUNY/f KqpeQ31vdfu+R+rvEPpyYA== X-Received: by 2002:a9d:6441:0:b0:6b8:7eef:a236 with SMTP id m1-20020a9d6441000000b006b87eefa236mr6280865otl.30.1700082206536; Wed, 15 Nov 2023 13:03:26 -0800 (PST) Received: from herring.priv (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id a18-20020a056830101200b006cdf9935af2sm494337otp.53.2023.11.15.13.03.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 13:03:25 -0800 (PST) Received: (nullmailer pid 3747903 invoked by uid 1000); Wed, 15 Nov 2023 21:03:25 -0000 From: Rob Herring To: Russell King , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [RESEND PATCH] ARM: imx: Use device_get_match_data() Date: Wed, 15 Nov 2023 15:03:18 -0600 Message-ID: <20231115210319.3747145-1-robh@kernel.org> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Wed, 15 Nov 2023 13:05:08 -0800 (PST) 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 --- arch/arm/mach-imx/mmdc.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-imx/mmdc.c b/arch/arm/mach-imx/mmdc.c index 2157493b78a9..897e6def59ee 100644 --- a/arch/arm/mach-imx/mmdc.c +++ b/arch/arm/mach-imx/mmdc.c @@ -13,7 +13,8 @@ #include #include #include -#include +#include +#include #include #include @@ -103,7 +104,7 @@ struct mmdc_pmu { struct device *dev; struct perf_event *mmdc_events[MMDC_NUM_COUNTERS]; struct hlist_node node; - struct fsl_mmdc_devtype_data *devtype_data; + const struct fsl_mmdc_devtype_data *devtype_data; struct clk *mmdc_ipg_clk; }; @@ -474,8 +475,6 @@ static int imx_mmdc_perf_init(struct platform_device *pdev, void __iomem *mmdc_b struct mmdc_pmu *pmu_mmdc; char *name; int ret; - const struct of_device_id *of_id = - of_match_device(imx_mmdc_dt_ids, &pdev->dev); pmu_mmdc = kzalloc(sizeof(*pmu_mmdc), GFP_KERNEL); if (!pmu_mmdc) { @@ -503,7 +502,7 @@ static int imx_mmdc_perf_init(struct platform_device *pdev, void __iomem *mmdc_b GFP_KERNEL, "mmdc%d", ret); pmu_mmdc->mmdc_ipg_clk = mmdc_ipg_clk; - pmu_mmdc->devtype_data = (struct fsl_mmdc_devtype_data *)of_id->data; + pmu_mmdc->devtype_data = device_get_match_data(&pdev->dev); hrtimer_init(&pmu_mmdc->hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); -- 2.42.0