Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp654048rdb; Fri, 6 Oct 2023 14:44:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH6KnqxO+7Fd3nxp7L8KirQ2vyQ6unLTrIOUZHHeUcu6CYcnTBEz5H+Gw++Nz3F5uZDHZnW X-Received: by 2002:a17:90a:be0b:b0:279:71c:19bb with SMTP id a11-20020a17090abe0b00b00279071c19bbmr8904510pjs.34.1696628698203; Fri, 06 Oct 2023 14:44:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696628698; cv=none; d=google.com; s=arc-20160816; b=TiXIxIR0tpclWcnU391yYmLYfwLpCelrqUsgNT2QLJRUuJFzPB6G5INq5PBt5JknHn ixf4IAECrMvBc5ohTgRsrcOG+hhcOC5jm8ibwZvYEetEK6dRWaI/UghMpUjhTNlOcH2+ 3tHCy2rkYGXnAHBO+cVITSYi/tFV4CBYMEGtRyAkD4y5v7nCA3vylMnuuqbR9SJNzZr0 MpM6hsBt4gWO8ycrlcyllshaQX0Qbz6laj6+LR5eLsgz9WeQfLuTQJ0p+Y8mdmOy6zoc S8pGoI76PIJT1DT9h3VHtGNsDbgFPwrRLI4rDChyjFXnMcPpYp4FoxUSL0xDJDJdb6lJ C4LQ== 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=rpLbG19r89ySc34NjkPDn+0aPHODOeJ8J8sXL576zm0=; fh=lZbB9LbWWa2L4HpLy3kO7Jx22ojiilYKpUDAhK0OcoA=; b=0b+EBh2HIRrU5TsuGUPBXVBd+q847mqaFGmPQ+vnbQxzaefG8/t39/HDGdpgU9a8tQ LcgqUK0iq9p9yDL5k7tq1x5YM5D3PWzQYBmITO0gNAQxfD190aS7WU3dAdaZbx+HnPbi TQIG2nAuUePbUdQvErCXYxE0vR9wZxWLOL6i/TiowSiMTZbTPQn9BVxDZMlO0Gn2a30m jMrBPtk6YWuLcb95G9Ll4XO9TWd6BHUi2So3HdW4mRhP48cr1roPli2CH4gD9dCpILvS cHWwSDH5kIKnBQeaxHWfRE2EupngB+lMnJE0GbW/BeH9DSEaVWlX8T5Jk1KqBpRTgqbg cY7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jYq+VfS3; 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 mh3-20020a17090b4ac300b002683f507990si7206283pjb.109.2023.10.06.14.44.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 14:44:58 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jYq+VfS3; 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 9E50180A1E1C; Fri, 6 Oct 2023 14:44:55 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233760AbjJFVoq (ORCPT + 99 others); Fri, 6 Oct 2023 17:44:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34178 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233714AbjJFVop (ORCPT ); Fri, 6 Oct 2023 17:44:45 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC922DB; Fri, 6 Oct 2023 14:44:44 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E7580C433C7; Fri, 6 Oct 2023 21:44:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696628684; bh=j6jeoiDnXWM/5Q7Gi01zs2uZBy0XxUNcurOM7FdoVAM=; h=From:To:Cc:Subject:Date:From; b=jYq+VfS3/DMO5bC4IGgNvqt8KM6g4g4McZgm98bSioUxP8aXXud0ST4iisuQQtTea OjLjgylHOsST1R8uPPdtGWOA3MbZDnnyrUmANNDM7Kfyw7gylfsbBVBUeNEe12q+Yz Z/g7x7LBrIktqtN9WM6zZviJJQ/ZmgkTaR3VNgLX01rVrX/cjFxQ3dpuCg7hHNw2pf 1aEv05NZrCFdM00PGGS4pzTVhPeMJgs/kE16RZloU0Ee/YavGN1Vg/oB1+z6neovCc OgwE11i+jVm6PgittK3pbvaVW1XvzRfNTMA6yD7XFiRVTwBNpjHqrpIRl7/E72cUKG 5vpBHC1Y/TRBQ== Received: (nullmailer pid 339820 invoked by uid 1000); Fri, 06 Oct 2023 21:44:37 -0000 From: Rob Herring To: Damien Le Moal Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] ata: xgene: Use of_device_get_match_data() Date: Fri, 6 Oct 2023 16:44:33 -0500 Message-Id: <20231006214433.339688-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 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]); Fri, 06 Oct 2023 14:44:55 -0700 (PDT) X-Spam-Level: ** Use preferred of_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 --- Perhaps device_get_match_data() could be used here and all the ACPI specific code dropped, but not sure if all the ACPI code is really necessary. --- drivers/ata/ahci_xgene.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/ata/ahci_xgene.c b/drivers/ata/ahci_xgene.c index ccef5e63bdf9..81a1d838c0fc 100644 --- a/drivers/ata/ahci_xgene.c +++ b/drivers/ata/ahci_xgene.c @@ -13,9 +13,7 @@ #include #include #include -#include -#include -#include +#include #include #include "ahci.h" @@ -735,7 +733,6 @@ static int xgene_ahci_probe(struct platform_device *pdev) struct ahci_host_priv *hpriv; struct xgene_ahci_context *ctx; struct resource *res; - const struct of_device_id *of_devid; enum xgene_ahci_version version = XGENE_AHCI_V1; const struct ata_port_info *ppi[] = { &xgene_ahci_v1_port_info, &xgene_ahci_v2_port_info }; @@ -778,10 +775,8 @@ static int xgene_ahci_probe(struct platform_device *pdev) ctx->csr_mux = csr; } - of_devid = of_match_device(xgene_ahci_of_match, dev); - if (of_devid) { - if (of_devid->data) - version = (unsigned long) of_devid->data; + if (dev->of_node) { + version = (enum xgene_ahci_version)of_device_get_match_data(dev); } #ifdef CONFIG_ACPI else { -- 2.40.1