Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp654876rdb; Fri, 6 Oct 2023 14:47:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE/DC5jVdV5j6C3b5IsaZUtjD+53anZ7m3gKE1w3pxw6lOWN9hBceqZsIm7JW0ksWimfCRT X-Received: by 2002:a05:6a20:8f26:b0:159:fe1d:2f32 with SMTP id b38-20020a056a208f2600b00159fe1d2f32mr10930464pzk.42.1696628842738; Fri, 06 Oct 2023 14:47:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696628842; cv=none; d=google.com; s=arc-20160816; b=Z9QKvRs4Y96xBWYVmneXLLD2FJ5g8xi2FDrSjbpm2vmK2eRTiaCKWfjCNNi+N76oEx T44j32e18dIzk7E6+5aDZLQp35f+qkb1G2EGIptgWQUHwjuQSb1ktg13REAzqz0BiElE dpLzgqvr0hF+ucAm2y8f/hx8aVHryy77GbTFjPF2f+S96zKOU/CnoroScmmbTtZv3Fpf o0E7guB6lyw0MlODl04ucD1Le0c+1SMDlO7EAZna4ol8jPPn1D7zT61xp3ZZSyaym5+V QPs7vRwlo5asFSM0I5Z/HtrLhugpUAoGdv3pfP69F53y8t4wpHr+rAqdshV37dVFytNJ fgFg== 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:dkim-signature; bh=I9PsFoNARmzLRQl+aWCMB+2Yrer28wJnyJsRsOTDMN8=; fh=ro6gPE4ZGXeuMUns6/M6SWqXYyzj94CHkdRAxzOyolw=; b=Qyl/8NndCIVk1R7xKBygjTLVa/R+IeyvFvzqKzwqVBVDabiUgL6mxNc5d+BS2U2KcO eVwS1bEpJ9A4Cal+1r3QYHzoSUIH5BxacmSyuTEzKoKvrk1yajKUygZQPMRIGqljEbSP r5HxaEdqZtb93dX0i7YvAJ0c26ziXE75fNun1bmqor433qkU1m9RZO+cc/DuNVQPpMcm YgjQv5ZuF4rOQwJiVFO4x/t3QSmFKRHdpC97m3RtNZ+lnPQdpczmwWz2g+0ZPp1L9VDc T4cUxTFcpDvmXJ+WBsB3BuYLU5z1B+/Ir2m0mZ5+o6SZBAAdHd2rQFq8I/VXyLWj+IyW NycQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TSBhAOcJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id n3-20020a170902d2c300b001b9d5f07068si4769386plc.585.2023.10.06.14.47.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 14:47:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TSBhAOcJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (Postfix) with ESMTP id 3A9AF832B19B; Fri, 6 Oct 2023 14:45:06 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233759AbjJFVo5 (ORCPT + 99 others); Fri, 6 Oct 2023 17:44:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233783AbjJFVoy (ORCPT ); Fri, 6 Oct 2023 17:44:54 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11378F9; Fri, 6 Oct 2023 14:44:48 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 89A98C433C8; Fri, 6 Oct 2023 21:44:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696628688; bh=mu/lIRhJDrCa7DuHJvaUMHjw/zy7mbs5KoPEOxnbT0k=; h=From:To:Cc:Subject:Date:From; b=TSBhAOcJ40um/DnGW6VF0LUGqiQWQtk5DVI0qLo0afN46m9Xmuh4QXssoH8qNRmER qXE953NsjLMgoaALnMZ/Swe93zYeNA42nsxeSJZEs7y1B6dfpg9J5hdjPgHTLFGUh1 rHLP3mWhnoHLW3KSB8Ac+rPr528O/+FT2DSjP5Rq8MDmqqlQnxCmV9OhzSs/WKccGS akG1DmD1dKVSWmWf9CibKm8RsO/d4dj36xQoSgT1hg5kPq43ISOieD0HCajAujqH2/ Qejz3uvnqZ+XTFfUuhhMWFhKRa9LE43DKR9O2hDnNlMZ5lZdpECHH4brC6fH+xhLf8 norMmTCcH1T/A== Received: (nullmailer pid 339997 invoked by uid 1000); Fri, 06 Oct 2023 21:44:46 -0000 From: Rob Herring To: Damien Le Moal , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team Cc: linux-ide@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] ata: imx: Use device_get_match_data() Date: Fri, 6 Oct 2023 16:44:42 -0500 Message-Id: <20231006214442.339890-1-robh@kernel.org> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.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 (agentk.vger.email [0.0.0.0]); Fri, 06 Oct 2023 14:45:07 -0700 (PDT) X-Spam-Level: ** 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 --- drivers/ata/ahci_imx.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/ata/ahci_imx.c b/drivers/ata/ahci_imx.c index 9fa005965f3b..cb768f66f0a7 100644 --- a/drivers/ata/ahci_imx.c +++ b/drivers/ata/ahci_imx.c @@ -9,10 +9,11 @@ #include #include #include +#include #include #include #include -#include +#include #include #include #include @@ -1050,16 +1051,11 @@ static int imx8_sata_probe(struct device *dev, struct imx_ahci_priv *imxpriv) static int imx_ahci_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - const struct of_device_id *of_id; struct ahci_host_priv *hpriv; struct imx_ahci_priv *imxpriv; unsigned int reg_val; int ret; - of_id = of_match_device(imx_ahci_of_match, dev); - if (!of_id) - return -EINVAL; - imxpriv = devm_kzalloc(dev, sizeof(*imxpriv), GFP_KERNEL); if (!imxpriv) return -ENOMEM; @@ -1067,7 +1063,7 @@ static int imx_ahci_probe(struct platform_device *pdev) imxpriv->ahci_pdev = pdev; imxpriv->no_device = false; imxpriv->first_time = true; - imxpriv->type = (unsigned long)of_id->data; + imxpriv->type = (enum ahci_imx_type)device_get_match_data(dev); imxpriv->sata_clk = devm_clk_get(dev, "sata"); if (IS_ERR(imxpriv->sata_clk)) { -- 2.40.1