projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a8b1de7
)
ath10k: Use devm_platform_get_and_ioremap_resource()
author
Yang Yingliang
<yangyingliang@huawei.com>
Sat, 5 Jun 2021 11:02:27 +0000
(19:02 +0800)
committer
Kalle Valo
<kvalo@codeaurora.org>
Tue, 15 Jun 2021 14:04:51 +0000
(17:04 +0300)
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
drivers/net/wireless/ath/ath10k/ahb.c
patch
|
blob
|
history
diff --git
a/drivers/net/wireless/ath/ath10k/ahb.c
b/drivers/net/wireless/ath/ath10k/ahb.c
index 869524852fbaa3f29aca43e8d77cd3e7cf57bc00..ab8f77ae5e6673cd5e19a21b354694beeff7b8f9 100644
(file)
--- 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);