[PATCH drm/hisilicon 2/2] drm/hisilicon: Use the new api devm_drm_msi_install

From: Tian Tao
Date: Tue Dec 15 2020 - 06:50:05 EST


Use devm_drm_msi_install to enable pci msi so that
pci_disable_msi is not called when hibmc is removed.

Signed-off-by: Tian Tao <tiantao6@xxxxxxxxxxxxx>
---
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
index 7e91ef1..21f8225 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
+++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
@@ -251,7 +251,6 @@ static int hibmc_hw_init(struct hibmc_drm_private *priv)
static int hibmc_unload(struct drm_device *dev)
{
drm_atomic_helper_shutdown(dev);
- pci_disable_msi(dev->pdev);

return 0;
}
@@ -282,7 +281,7 @@ static int hibmc_load(struct drm_device *dev)
goto err;
}

- ret = pci_enable_msi(dev->pdev);
+ ret = devm_drm_msi_install(dev);
if (ret) {
drm_warn(dev, "enabling MSI failed: %d\n", ret);
} else {
--
2.7.4