[3/6] drm/amd: Use drm_dev_unregister()

Submitted by Noralf Trønnes on Feb. 3, 2019, 3:41 p.m.

Details

Message ID 20190203154200.61479-4-noralf@tronnes.org
State New
Headers show
Series "drm/drv: Remove drm_dev_unplug()" ( rev: 1 ) in AMD X.Org drivers

Not browsing as part of any series.

Commit Message

Noralf Trønnes Feb. 3, 2019, 3:41 p.m.
drm_dev_unplug() has been stripped down and is going away. Open code its
2 remaining function calls.

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: David (ChunMing) Zhou <David1.Zhou@amd.com>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
index a1bb3773087b..1265fc07120a 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
@@ -970,7 +970,8 @@  amdgpu_pci_remove(struct pci_dev *pdev)
 	struct drm_device *dev = pci_get_drvdata(pdev);
 
 	DRM_ERROR("Device removal is currently not supported outside of fbcon\n");
-	drm_dev_unplug(dev);
+	drm_dev_unregister(dev);
+	drm_dev_put(dev);
 	pci_disable_device(pdev);
 	pci_set_drvdata(pdev, NULL);
 }