From patchwork Wed Nov 15 21:03:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring (Arm)" X-Patchwork-Id: 13457378 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8BCEDC072A2 for ; Wed, 15 Nov 2023 21:03:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=gqEejqbwc6ndCUO1DbDQTke38AR9triAOxE7p9PIbq8=; b=ZlZDxvsvRwv2la MZcSwnrasYijrJRIvtiKisrrp/1ju5cSQ9QG/nV1GL/hgmQRMKiOPu9JU0YEEZyy5nSCPOHbMGnaH ddAxN1F6NGiuY+Bojqz17upuHSBkd2CSIvmTWGESLWScFnaAy3yWbx1mE93tAKP/0Vuz40kKg/QqU 0av0OmPEPFheh6Q/d4DuFOcbEwnea1AJbDIlX9mqZ+CCJNOjR/LlW8qCdJSfYyp2dy8dO9scS8zyB lVWUywdcdTft2q2gZOF7mFg2cykLet2lTTSxNybS9APJ2ohL9qupZC/X4aNwYiBlQWu/Uxw8RO9fC lG0kq2JysWV7mKMYvOkQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r3N2p-001jd7-0d; Wed, 15 Nov 2023 21:03:31 +0000 Received: from mail-ot1-f53.google.com ([209.85.210.53]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r3N2m-001jcB-1b for linux-arm-kernel@lists.infradead.org; Wed, 15 Nov 2023 21:03:29 +0000 Received: by mail-ot1-f53.google.com with SMTP id 46e09a7af769-6d2fedd836fso50348a34.1 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=sNzQcJw0YOgAR+OocozjODmULn6M2vy36utptj3KeWH5vuvK9n7Kb+Aqg0YVy/7DQN h31ZHxpylWoIn1VX8cncdzhIUR/JOhbjmvKCNuN4/pSX2jyRt0qCzFTBXHpcodIWjhCw Jjlunh++UwZtKhM/HIOWCVVMLqLBZwDp9ZYfV2ZXxt+jBDeVgyeISwyl9lWVT2fWjNpp +OuXdvjYqhV0JdwRRpnJKUfCCBxiYXx0rbv36uXApsGSHFk3BhKAXoIh2wj1hsoCxg50 n2D/Zy+16pArGZibyYumW4LhP7B03iEB5RYwOW+V/FdixrZgOA6vqtTk+wg4/U9liMHP MrXg== X-Gm-Message-State: AOJu0YwKsxB4EtftsRESt89EQm5RxXLmxh1EA1f3VxyKBT5y4lBSj8ct xhXjCdssND/a+7RKoIIahtfGqmSbRQ== X-Google-Smtp-Source: AGHT+IFW0uhDYGUzbH1Ef+e9gAZlnJ1rqTH3m/OAXMWQ8DRDz/rhGdc7NHP3E0sqMJantRNrsGmeIg== 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231115_130328_535812_2FC47E8D X-CRM114-Status: GOOD ( 14.29 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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);