From: Chris Wilson Date: Fri, 24 Jun 2016 14:36:20 +0000 (+0100) Subject: drm: Do a full device unregister when unplugging X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a39be606f99d;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git drm: Do a full device unregister when unplugging 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 Cc: David Airlie Cc: Daniel Vetter Cc: Laurent Pinchart Cc: Alexey Brodkin Cc: Amitoj Kaur Chawla Cc: dri-devel@lists.freedesktop.org Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1466778982-6974-3-git-send-email-chris@chris-wilson.co.uk --- 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);