Skip to content

Commit 1655266

Browse files
tiwaigregkh
authored andcommitted
drm/ast: Fix missing conversions to managed API
[ Upstream commit 9ea172a ] The commit 7cbb93d ("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: 7cbb93d ("drm/ast: Use managed pci functions") Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/20210421170458.21178-1-tiwai@suse.de Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 5885fce commit 1655266

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎drivers/gpu/drm/ast/ast_main.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ struct ast_private *ast_device_create(struct drm_driver *drv,
409409
dev->pdev = pdev;
410410
pci_set_drvdata(pdev, dev);
411411

412-
ast->regs = pci_iomap(dev->pdev, 1, 0);
412+
ast->regs = pcim_iomap(pdev, 1, 0);
413413
if (!ast->regs)
414414
return ERR_PTR(-EIO);
415415

@@ -425,7 +425,7 @@ struct ast_private *ast_device_create(struct drm_driver *drv,
425425

426426
/* "map" IO regs if the above hasn't done so already */
427427
if (!ast->ioregs) {
428-
ast->ioregs = pci_iomap(dev->pdev, 2, 0);
428+
ast->ioregs = pcim_iomap(pdev, 2, 0);
429429
if (!ast->ioregs)
430430
return ERR_PTR(-EIO);
431431
}

0 commit comments

Comments
 (0)