ath10k.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] ath10k: Use devm_platform_get_and_ioremap_resource()
@ 2021-06-05 11:02 Yang Yingliang
  2021-06-15 14:05 ` Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: Yang Yingliang @ 2021-06-05 11:02 UTC (permalink / raw)
  To: linux-kernel, netdev, ath10k, linux-wireless; +Cc: kvalo, davem, kuba

Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 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


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] ath10k: Use devm_platform_get_and_ioremap_resource()
  2021-06-05 11:02 [PATCH net-next] ath10k: Use devm_platform_get_and_ioremap_resource() Yang Yingliang
@ 2021-06-15 14:05 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2021-06-15 14:05 UTC (permalink / raw)
  To: Yang Yingliang; +Cc: linux-kernel, netdev, ath10k, linux-wireless, davem, kuba

Yang Yingliang <yangyingliang@huawei.com> wrote:

> 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>

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


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-15 16:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-05 11:02 [PATCH net-next] ath10k: Use devm_platform_get_and_ioremap_resource() Yang Yingliang
2021-06-15 14:05 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).