From patchwork Fri Oct 20 15:21:17 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: 13430872 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 A407FCDB474 for ; Fri, 20 Oct 2023 15:22:44 +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=FaVCVb9oqSEMTQj3xErQWHR+K9LDTY5/Jngqiz8co+o=; b=hkYAEPbM8bA0vy ZB4Ai6nuEnRM+lPDF5iLaBen9xgsHSTgrWOXLZnyspZ9xl5rpymBMcshMW9yhwUg8VTSDHpueFyZa zsk97YAYN4vsz/YdlS8BkFJ7fnws+Y8x/pvNy1V22ijPHvd26OSOZinLdT2tTq9HjatndhHcIxeAW WmoYS+aNUXptJE3fhoupZR+3B8mBJIzgK55dgBOLGl6kPNTrIFhdkWWnKGqb38jq1Uo/xt3lV2DG6 WF34ZN16dc7jcMt7KaJ3aFbX/GD22AqJmDKfE3knadzLO3Em8tgoF7ZxedXowoAHZYqiyZbDnL0WN By360aSJCuOKkEIcll2Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qtrKJ-002b5f-2R; Fri, 20 Oct 2023 15:22:15 +0000 Received: from mail-oi1-f174.google.com ([209.85.167.174]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qtrKH-002b5B-0i for linux-arm-kernel@lists.infradead.org; Fri, 20 Oct 2023 15:22:14 +0000 Received: by mail-oi1-f174.google.com with SMTP id 5614622812f47-3af6bd48093so539362b6e.3 for ; Fri, 20 Oct 2023 08:22:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697815332; x=1698420132; 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=nALrk+XFNQ60cSPVh7z3lKIsU/sRLu5t+EXSak55RSA=; b=Km4lVbrJDkQnlfenEeu9HiflZh4yy8CN3RtKIx2alIkW428o4UypxHbiDou55Wxbew jZr0t5Rf2ScglDGyQq49+b6uArokEemATZjc/ezd8YLkWd97STMK+aAYicsWYey1fPDe 0hUVGn8Yry9DTbniYmvwCgpFXs/wCMNLoCbyuO9sYpVFqNH6qEn/PxYbWt3Qd1fR3mig DYcxWNYfcU8CaTagV7yx4/3OuM6brG9js5CcNe11tLQDrRVR0N2ohyEbAt7OcAN2anVu aSTVAfzhSIwAzWmSKyeokQq2TzAie3xFkUU1hPGc4nC5Qnt3Vzydp2S8fMoIbvXBIOHp Sg4A== X-Gm-Message-State: AOJu0YzOpEO8iMnYQZkCMij0EAjyOlDhG/OnbWqLL/dit0wgqce2xCIX eSofrKCoeAO7CGOJtD/ogDSZT7vqow== X-Google-Smtp-Source: AGHT+IGZ9ST6PCHhhD06Q1lcCdFq+lo39/J/y+pMQ+x4+1Lc4waCGqLqIb5JCIOodCOaGkbAqdgSLQ== X-Received: by 2002:a05:6808:4d3:b0:3a7:2524:6d3b with SMTP id a19-20020a05680804d300b003a725246d3bmr2165384oie.12.1697815331839; Fri, 20 Oct 2023 08:22:11 -0700 (PDT) Received: from herring.priv (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id bp18-20020a056808239200b003b2e2d134a5sm357266oib.35.2023.10.20.08.22.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 08:22:11 -0700 (PDT) Received: (nullmailer pid 3323161 invoked by uid 1000); Fri, 20 Oct 2023 15:22:10 -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: Fri, 20 Oct 2023 10:21:17 -0500 Message-ID: <20231020152116.3314175-2-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-20231020_082213_264135_B4FCB66F X-CRM114-Status: GOOD ( 14.00 ) 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 --- Resending as I had an issue sending to kernel.org accounts. 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);