diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2021-06-05 14:02:27 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2021-06-15 17:04:51 +0300 |
commit | ea1c2023efbc268f3d96b09e945af9648723d393 (patch) | |
tree | 8987b09f55fe151b0ed24e28b35d1d295092938e /drivers/net/wireless/ath | |
parent | a8b1de7f4f68d558fb952e765aa25e90b50a2388 (diff) | |
download | linux-ea1c2023efbc268f3d96b09e945af9648723d393.tar.xz |
ath10k: Use devm_platform_get_and_ioremap_resource()
Use devm_platform_get_and_ioremap_resource() to simplify
code.
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210605110227.2429420-1-yangyingliang@huawei.com
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r-- | drivers/net/wireless/ath/ath10k/ahb.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/net/wireless/ath/ath10k/ahb.c b/drivers/net/wireless/ath/ath10k/ahb.c index 869524852fba..ab8f77ae5e66 100644 --- a/drivers/net/wireless/ath/ath10k/ahb.c +++ b/drivers/net/wireless/ath/ath10k/ahb.c @@ -442,14 +442,7 @@ static int ath10k_ahb_resource_init(struct ath10k *ar) pdev = ar_ahb->pdev; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) { - ath10k_err(ar, "failed to get memory resource\n"); - ret = -ENXIO; - goto out; - } - - ar_ahb->mem = devm_ioremap_resource(&pdev->dev, res); + ar_ahb->mem = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(ar_ahb->mem)) { ath10k_err(ar, "mem ioremap error\n"); ret = PTR_ERR(ar_ahb->mem); |