projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
52b776f
)
ath11k: convert to devm_platform_get_and_ioremap_resource
author
Wei Yongjun
<weiyongjun1@huawei.com>
Fri, 8 May 2020 07:53:23 +0000
(07:53 +0000)
committer
Kalle Valo
<kvalo@codeaurora.org>
Tue, 12 May 2020 07:34:36 +0000
(10:34 +0300)
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>
Link:
https://lore.kernel.org/r/20200508075323.81128-1-weiyongjun1@huawei.com
drivers/net/wireless/ath/ath11k/ahb.c
patch
|
blob
|
history
diff --git
a/drivers/net/wireless/ath/ath11k/ahb.c
b/drivers/net/wireless/ath/ath11k/ahb.c
index
ef1038a
..
3009284
100644
(file)
--- a/
drivers/net/wireless/ath/ath11k/ahb.c
+++ b/
drivers/net/wireless/ath/ath11k/ahb.c
@@
-914,13
+914,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);