[PATCH net-next] ath10k: Use devm_platform_get_and_ioremap_resource()

Subsystems: atheros ath generic utilities, qualcomm atheros ath10k wireless driver, the rest

STALE1882d LANDED

Landed in mainline as ea1c2023efbc on 2021-06-15.

2 messages, 2 authors, 2021-06-15 · open the first message on its own page

[PATCH net-next] ath10k: Use devm_platform_get_and_ioremap_resource()

From: Yang Yingliang <hidden>
Date: 2021-06-05 10:58:16

Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <redacted>
---
 drivers/net/wireless/ath/ath10k/ahb.c | 9 +--------
 1 file changed, 1 insertion(+), 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);
-- 
2.25.1

Re: [PATCH net-next] ath10k: Use devm_platform_get_and_ioremap_resource()

From: Kalle Valo <hidden>
Date: 2021-06-15 14:05:26

Yang Yingliang [off-list ref] wrote:
Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <redacted>
Signed-off-by: Kalle Valo <redacted>
Patch applied to ath-next branch of ath.git, thanks.

ea1c2023efbc ath10k: Use devm_platform_get_and_ioremap_resource()

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20210605110227.2429420-1-yangyingliang@huawei.com/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help