From patchwork Mon Oct 9 17:29:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 150229 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a888:0:b0:403:3b70:6f57 with SMTP id x8csp2022046vqo; Mon, 9 Oct 2023 10:32:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEFI8y09USl2DWZMgv9B8hXgfmO/2FTBlNS8ZxBvI/h60PbuSCvcHpBfv8+tUigpNmqCWz8 X-Received: by 2002:a05:6830:124c:b0:6c4:c2c8:5787 with SMTP id s12-20020a056830124c00b006c4c2c85787mr16886510otp.22.1696872753442; Mon, 09 Oct 2023 10:32:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696872753; cv=none; d=google.com; s=arc-20160816; b=bhCQRfXrExQN5wMBbo3EvKwZizB6kRlADHTiKRUBAi0y8oHZqY8RgLcIb/fW6nE6aR G3myPxCle8sqQpR7j/nj7pX4kQu7mpfYeFG0GGOTTbM/lY/c3BiJgwvEdUYYc1TH2Qox qyCH2IzEOB/zhQ1FswszVX9nqXUDXQa7SpW04j7csK6O4jPOhFf/3RQO9MjZg8ip8+oi CJw6v/0QNq2reE2lCFhbR4VtPg9KzbTdERR2UNsOmyGrFXXahKCLHq6rlHQQyoi5CvTE REWoT7a678fMS18f8s3ovelzcy6hTZ7z/mDnIa+3rhDqgBg4yUGnONSLcTzv9bO+E+A7 d8ng== 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=WDb2VGXzs4WNA1gPHq7/c+Ck0GU04W6LQjrjrtsMA14=; fh=ITvVHEwk3OvZEkbrqPWxeX0jjjIzlwiyF9wdC1Fo3eg=; b=VrsJN6UzqKKB4vsmFLCWt0o6K5nBaBoLkadvLG3i9gh7yqzSl9onghtw6EEg5aTaXg LlulVb51ywp6HVmOF2ta/1RegV2awHm0Un9AKSV4Ujuvse3fTadGGvT0bP5YQeJY+IAF N5OzPAfJatVYns7Ry7InUQYKhcF4thSwg8R5WoarGO8O8Y6/EQD8uDFEl5jCpdSedKow viECCqftJQ2SOePv3FEFs6eqqCpRCr85MwFAux632ReB3XPfrlwXoM69R9RXsEwMxUnP bEGljr97UE59XsC9ivPigbojc3a+n6T7ea56sv8sfWQW1gWt6G5liqCV6SLAeHadtQT5 gSXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TYyL+4tO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id i68-20020a639d47000000b0059a1cedf5b8si685434pgd.88.2023.10.09.10.32.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 10:32:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TYyL+4tO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (Postfix) with ESMTP id 4AACF80C7103; Mon, 9 Oct 2023 10:32:31 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377281AbjJIRcX (ORCPT + 18 others); Mon, 9 Oct 2023 13:32:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49232 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377487AbjJIRcW (ORCPT ); Mon, 9 Oct 2023 13:32:22 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1457ADA; Mon, 9 Oct 2023 10:32:20 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2FAB7C433C7; Mon, 9 Oct 2023 17:32:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696872739; bh=hEEuhVXB8jp3AkUNOcjWDBzJbGLaSJnvN8RUFaE21U4=; h=From:To:Cc:Subject:Date:From; b=TYyL+4tOoVHormNoyYzlFs41+kBwRCWzQ1RjpCVa8R+Eg8z+ly8uzQSRc3uL5AQnJ SS/klPxwVxHrdxfK1ahqQ83DANXbmFEl8R/W7p3FuiEjnyZWYODv7d4gwH1r5/FLYv tF4bUi6M2UOba1gdiXweHmR+tSF8f/5zSow2Uw1Wig+T/5qjKxkp+R6R2XEVWYX570 3peoQs07wT4hJ4Hwm5BYBo2XcV7jeJTo+KGG4+vHAlOI0MmoO9HE5iZQuM1vZZfhxa ELgXzSpDY4VQ75G5HjtQAlFHxTipo1kmTUbsiDSwLQKlNYbcky6bz1I6fZtygtpSO7 t4CC/FsPJcJ8g== Received: (nullmailer pid 2523356 invoked by uid 1000); Mon, 09 Oct 2023 17:32:18 -0000 From: Rob Herring To: Kalle Valo , Jeff Johnson Cc: ath11k@lists.infradead.org, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next] net: wireless: ath11k: Use device_get_match_data() Date: Mon, 9 Oct 2023 12:29:06 -0500 Message-ID: <20231009172923.2457844-11-robh@kernel.org> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 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 howler.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 (howler.vger.email [0.0.0.0]); Mon, 09 Oct 2023 10:32:31 -0700 (PDT) X-Spam-Level: ** X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779300044471629673 X-GMAIL-MSGID: 1779300044471629673 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/net/wireless/ath/ath11k/ahb.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c index 1215ebdf173a..235336ef2a7a 100644 --- a/drivers/net/wireless/ath/ath11k/ahb.c +++ b/drivers/net/wireless/ath/ath11k/ahb.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include @@ -1084,19 +1085,12 @@ static int ath11k_ahb_fw_resource_deinit(struct ath11k_base *ab) static int ath11k_ahb_probe(struct platform_device *pdev) { struct ath11k_base *ab; - const struct of_device_id *of_id; const struct ath11k_hif_ops *hif_ops; const struct ath11k_pci_ops *pci_ops; enum ath11k_hw_rev hw_rev; int ret; - of_id = of_match_device(ath11k_ahb_of_match, &pdev->dev); - if (!of_id) { - dev_err(&pdev->dev, "failed to find matching device tree id\n"); - return -EINVAL; - } - - hw_rev = (uintptr_t)of_id->data; + hw_rev = (uintptr_t)device_get_match_data(&pdev->dev); switch (hw_rev) { case ATH11K_HW_IPQ8074: