diff options
author | Rob Herring <robh@kernel.org> | 2023-10-12 19:16:38 +0300 |
---|---|---|
committer | Kalle Valo <quic_kvalo@quicinc.com> | 2023-10-18 11:28:26 +0300 |
commit | 9d2c23d21aa4517e48e5d6d0dfb9f99f1aa07636 (patch) | |
tree | 49e55052f5a7e36a6d807f717361942e72d06db4 /drivers | |
parent | 10c65f97b424fcee439463f933140df2a0022f98 (diff) | |
download | linux-stable-9d2c23d21aa4517e48e5d6d0dfb9f99f1aa07636.tar.gz linux-stable-9d2c23d21aa4517e48e5d6d0dfb9f99f1aa07636.tar.bz2 linux-stable-9d2c23d21aa4517e48e5d6d0dfb9f99f1aa07636.zip |
wifi: ath11k: Use device_get_match_data()
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 <robh@kernel.org>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20231009172923.2457844-11-robh@kernel.org
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath/ath11k/ahb.c | 10 |
1 files 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 <linux/module.h> #include <linux/platform_device.h> +#include <linux/property.h> #include <linux/of_device.h> #include <linux/of.h> #include <linux/dma-mapping.h> @@ -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: |