mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 19:07:52 +00:00
ath10k: Use devm_platform_get_and_ioremap_resource()
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
This commit is contained in:
parent
a8b1de7f4f
commit
ea1c2023ef
1 changed files with 1 additions and 8 deletions
|
@ -442,14 +442,7 @@ static int ath10k_ahb_resource_init(struct ath10k *ar)
|
||||||
|
|
||||||
pdev = ar_ahb->pdev;
|
pdev = ar_ahb->pdev;
|
||||||
|
|
||||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
ar_ahb->mem = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
|
||||||
if (!res) {
|
|
||||||
ath10k_err(ar, "failed to get memory resource\n");
|
|
||||||
ret = -ENXIO;
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
ar_ahb->mem = devm_ioremap_resource(&pdev->dev, res);
|
|
||||||
if (IS_ERR(ar_ahb->mem)) {
|
if (IS_ERR(ar_ahb->mem)) {
|
||||||
ath10k_err(ar, "mem ioremap error\n");
|
ath10k_err(ar, "mem ioremap error\n");
|
||||||
ret = PTR_ERR(ar_ahb->mem);
|
ret = PTR_ERR(ar_ahb->mem);
|
||||||
|
|
Loading…
Reference in a new issue