Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp2042951rdb; Mon, 9 Oct 2023 10:32:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGxxotAmGy97Hg2BbP3NPhjpGNRQAE/meI5tTg1X7cVlWeaO5sLhLTmerxTNlBdsmJpgOMn X-Received: by 2002:a05:6e02:930:b0:349:851b:3e48 with SMTP id o16-20020a056e02093000b00349851b3e48mr14872955ilt.28.1696872746910; Mon, 09 Oct 2023 10:32:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696872746; cv=none; d=google.com; s=arc-20160816; b=1CvfR7aZRS/uIM81Bse9k+x8oxLlFU4cjSHEDSHzBYvWWWOmBofWMaY7rnhTwdIm3K qZX4nip1zWXkznUhiQ2yBxV27yXecr7U6SYwQYcBw1X7DS/fpt9PcMzFkG57iVpoWVWf eq6TrCPzJxb/maEWb/tmu5mlWqy67TOBcjmILx4fQsjxqWbAwHIvdcvqrhfNhTEOhOoI dgDD8sfycim/Vi/GhsihdPGxcklA5BnWayfcFe6MElw0FwWL786gN9VCQbYdo3v++fW1 6zGRucJkJ/JMV8PJ6NSZA4Nua5HMXzsXai7VnR2MQILGeIE75+sBYpdsicA8nMn/zFLq 0WWg== 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=jhiMy1fOOt6TqFwo+r8vi0VHt+LMEgQ53QhivnahkmiuTM9pjn0dTz/UixStbWV6fC DLAQNDb//4vEZQIYBDDe0tQKWa4wG+ydlWWH5SrdUuxUROECul7wesSIKOo35iBKNULc 9ioueZBU1hIygd2YxRMtv3n/4X5HRDwbij9ow9a12HbJ2axfXIJ2BWzGZ9XA5MdPELAA VZo7Em5SoP9KVySqwkFQlXpHgC+c22ERsuGLdQbdOFT0NZQKBXZ+ZvW7HMgC0F4Lm4tb ugY6D3w7BHpAIykeiq0Rv954Kci+DTnTvqo+EjE/f3MMXjYxhbPXuNZshhnTOBKxR255 Yy9Q== 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-wireless-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-wireless-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. [23.128.96.38]) by mx.google.com with ESMTPS id f17-20020a631011000000b005637e28270fsi1095138pgl.243.2023.10.09.10.32.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 10:32:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; 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-wireless-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-wireless-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 1B2E98114ED7; Mon, 9 Oct 2023 10:32:24 -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 S1377974AbjJIRcX (ORCPT + 52 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 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-wireless@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Mon, 09 Oct 2023 10:32:24 -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/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: -- 2.42.0