[PATCH 3/5] drm: Do a full device unregister when unplugging

Chris Wilson chris at chris-wilson.co.uk
Fri Jun 24 14:36:20 UTC 2016


Rather than do a partial unregister of just the minors, unregister the
device (drm_dev_unregister(), and so remove all userspace interfaces,
when the device is unplugged (drm_unplug_dev()).

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Cc: David Airlie <airlied at linux.ie>
Cc: Daniel Vetter <daniel.vetter at ffwll.ch>
Cc: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
Cc: Alexey Brodkin <Alexey.Brodkin at synopsys.com>
Cc: Amitoj Kaur Chawla <amitoj1606 at gmail.com>
Cc: dri-devel at lists.freedesktop.org
---
 drivers/gpu/drm/drm_drv.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
index aead9ffcbe29..be27ed36f56e 100644
--- a/drivers/gpu/drm/drm_drv.c
+++ b/drivers/gpu/drm/drm_drv.c
@@ -362,9 +362,7 @@ EXPORT_SYMBOL(drm_put_dev);
 void drm_unplug_dev(struct drm_device *dev)
 {
 	/* for a USB device */
-	drm_minor_unregister(dev, DRM_MINOR_LEGACY);
-	drm_minor_unregister(dev, DRM_MINOR_RENDER);
-	drm_minor_unregister(dev, DRM_MINOR_CONTROL);
+	drm_dev_unregister(dev);
 
 	mutex_lock(&drm_global_mutex);
 
-- 
2.8.1



More information about the dri-devel mailing list