提交 7f234fa1 编写于 作者: T Takashi Iwai 提交者: Zheng Zengkai

drm/ast: Fix missing conversions to managed API

stable inclusion
from stable-5.10.50
commit 1655266d91eda6e8effd02dbdd2b633501dcb6b9
bugzilla: 174522 https://gitee.com/openeuler/kernel/issues/I4DNFY

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=1655266d91eda6e8effd02dbdd2b633501dcb6b9

--------------------------------

[ Upstream commit 9ea172a9 ]

The commit 7cbb93d8 ("drm/ast: Use managed pci functions")
converted a few PCI accessors to the managed API and dropped the
manual pci_iounmap() calls, but it seems to have forgotten converting
pci_iomap() to the managed one.  It resulted in the leftover resources
after the driver unbind.  Let's fix them.

Fixes: 7cbb93d8 ("drm/ast: Use managed pci functions")
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
Signed-off-by: NThomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20210421170458.21178-1-tiwai@suse.deSigned-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Acked-by: NWeilong Chen <chenweilong@huawei.com>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 eca36565
...@@ -409,7 +409,7 @@ struct ast_private *ast_device_create(struct drm_driver *drv, ...@@ -409,7 +409,7 @@ struct ast_private *ast_device_create(struct drm_driver *drv,
dev->pdev = pdev; dev->pdev = pdev;
pci_set_drvdata(pdev, dev); pci_set_drvdata(pdev, dev);
ast->regs = pci_iomap(dev->pdev, 1, 0); ast->regs = pcim_iomap(pdev, 1, 0);
if (!ast->regs) if (!ast->regs)
return ERR_PTR(-EIO); return ERR_PTR(-EIO);
...@@ -425,7 +425,7 @@ struct ast_private *ast_device_create(struct drm_driver *drv, ...@@ -425,7 +425,7 @@ struct ast_private *ast_device_create(struct drm_driver *drv,
/* "map" IO regs if the above hasn't done so already */ /* "map" IO regs if the above hasn't done so already */
if (!ast->ioregs) { if (!ast->ioregs) {
ast->ioregs = pci_iomap(dev->pdev, 2, 0); ast->ioregs = pcim_iomap(pdev, 2, 0);
if (!ast->ioregs) if (!ast->ioregs)
return ERR_PTR(-EIO); return ERR_PTR(-EIO);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册