* [PATCH next] ath11k: convert to devm_platform_get_and_ioremap_resource
@ 2020-05-08 7:53 ` Wei Yongjun
0 siblings, 0 replies; 6+ messages in thread
From: Wei Yongjun @ 2020-05-08 7:53 UTC (permalink / raw)
To: Kalle Valo; +Cc: Wei Yongjun, ath11k, linux-wireless, kernel-janitors
Use the helper function that wraps the calls to platform_get_resource()
and devm_ioremap_resource() together.
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/net/wireless/ath/ath11k/ahb.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c
index 3b2b76d602f2..d4ad99eb0e16 100644
--- a/drivers/net/wireless/ath/ath11k/ahb.c
+++ b/drivers/net/wireless/ath/ath11k/ahb.c
@@ -891,13 +891,7 @@ static int ath11k_ahb_probe(struct platform_device *pdev)
return -EINVAL;
}
- mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!mem_res) {
- dev_err(&pdev->dev, "failed to get IO memory resource\n");
- return -ENXIO;
- }
-
- mem = devm_ioremap_resource(&pdev->dev, mem_res);
+ mem = devm_platform_get_and_ioremap_resource(pdev, 0, &mem_res);
if (IS_ERR(mem)) {
dev_err(&pdev->dev, "ioremap error\n");
return PTR_ERR(mem);
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH next] ath11k: convert to devm_platform_get_and_ioremap_resource
@ 2020-05-08 7:53 ` Wei Yongjun
0 siblings, 0 replies; 6+ messages in thread
From: Wei Yongjun @ 2020-05-08 7:53 UTC (permalink / raw)
To: Kalle Valo; +Cc: linux-wireless, kernel-janitors, Wei Yongjun, ath11k
Use the helper function that wraps the calls to platform_get_resource()
and devm_ioremap_resource() together.
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/net/wireless/ath/ath11k/ahb.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c
index 3b2b76d602f2..d4ad99eb0e16 100644
--- a/drivers/net/wireless/ath/ath11k/ahb.c
+++ b/drivers/net/wireless/ath/ath11k/ahb.c
@@ -891,13 +891,7 @@ static int ath11k_ahb_probe(struct platform_device *pdev)
return -EINVAL;
}
- mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!mem_res) {
- dev_err(&pdev->dev, "failed to get IO memory resource\n");
- return -ENXIO;
- }
-
- mem = devm_ioremap_resource(&pdev->dev, mem_res);
+ mem = devm_platform_get_and_ioremap_resource(pdev, 0, &mem_res);
if (IS_ERR(mem)) {
dev_err(&pdev->dev, "ioremap error\n");
return PTR_ERR(mem);
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH next] ath11k: convert to devm_platform_get_and_ioremap_resource
@ 2020-05-08 7:53 ` Wei Yongjun
0 siblings, 0 replies; 6+ messages in thread
From: Wei Yongjun @ 2020-05-08 7:53 UTC (permalink / raw)
To: Kalle Valo; +Cc: linux-wireless, kernel-janitors, Wei Yongjun, ath11k
Use the helper function that wraps the calls to platform_get_resource()
and devm_ioremap_resource() together.
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/net/wireless/ath/ath11k/ahb.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c
index 3b2b76d602f2..d4ad99eb0e16 100644
--- a/drivers/net/wireless/ath/ath11k/ahb.c
+++ b/drivers/net/wireless/ath/ath11k/ahb.c
@@ -891,13 +891,7 @@ static int ath11k_ahb_probe(struct platform_device *pdev)
return -EINVAL;
}
- mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!mem_res) {
- dev_err(&pdev->dev, "failed to get IO memory resource\n");
- return -ENXIO;
- }
-
- mem = devm_ioremap_resource(&pdev->dev, mem_res);
+ mem = devm_platform_get_and_ioremap_resource(pdev, 0, &mem_res);
if (IS_ERR(mem)) {
dev_err(&pdev->dev, "ioremap error\n");
return PTR_ERR(mem);
_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH next] ath11k: convert to devm_platform_get_and_ioremap_resource
2020-05-08 7:53 ` Wei Yongjun
@ 2020-05-12 7:34 ` Kalle Valo
-1 siblings, 0 replies; 6+ messages in thread
From: Kalle Valo @ 2020-05-12 7:34 UTC (permalink / raw)
To: Wei Yongjun; +Cc: Wei Yongjun, ath11k, linux-wireless, kernel-janitors
Wei Yongjun <weiyongjun1@huawei.com> wrote:
> Use the helper function that wraps the calls to platform_get_resource()
> and devm_ioremap_resource() together.
>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Patch applied to ath-next branch of ath.git, thanks.
c8ffcd122760 ath11k: convert to devm_platform_get_and_ioremap_resource
--
https://patchwork.kernel.org/patch/11535829/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH next] ath11k: convert to devm_platform_get_and_ioremap_resource
@ 2020-05-12 7:34 ` Kalle Valo
0 siblings, 0 replies; 6+ messages in thread
From: Kalle Valo @ 2020-05-12 7:34 UTC (permalink / raw)
To: Wei Yongjun; +Cc: ath11k, linux-wireless, kernel-janitors
Wei Yongjun <weiyongjun1@huawei.com> wrote:
> Use the helper function that wraps the calls to platform_get_resource()
> and devm_ioremap_resource() together.
>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Patch applied to ath-next branch of ath.git, thanks.
c8ffcd122760 ath11k: convert to devm_platform_get_and_ioremap_resource
--
https://patchwork.kernel.org/patch/11535829/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH next] ath11k: convert to devm_platform_get_and_ioremap_resource
2020-05-08 7:53 ` Wei Yongjun
` (2 preceding siblings ...)
(?)
@ 2020-05-12 7:34 ` Kalle Valo
-1 siblings, 0 replies; 6+ messages in thread
From: Kalle Valo @ 2020-05-12 7:34 UTC (permalink / raw)
To: Wei Yongjun; +Cc: linux-wireless, kernel-janitors, ath11k
Wei Yongjun <weiyongjun1@huawei.com> wrote:
> Use the helper function that wraps the calls to platform_get_resource()
> and devm_ioremap_resource() together.
>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Patch applied to ath-next branch of ath.git, thanks.
c8ffcd122760 ath11k: convert to devm_platform_get_and_ioremap_resource
--
https://patchwork.kernel.org/patch/11535829/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-05-12 7:35 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-08 7:53 [PATCH next] ath11k: convert to devm_platform_get_and_ioremap_resource Wei Yongjun
2020-05-08 7:53 ` Wei Yongjun
2020-05-08 7:53 ` Wei Yongjun
2020-05-12 7:34 ` Kalle Valo
2020-05-12 7:34 ` Kalle Valo
2020-05-12 7:34 ` Kalle Valo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.