mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-27 11:58:32 -04:00
drm: gc now dead mode_group code
Two nice things here: - drm_dev_register will truly register everything in the right order if the driver doesn't have a ->load callback. Before this we had to init the primary mode_group after the device nodes where already registered. - Less things to keep track of when reworking the connector locking, yay! Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
This commit is contained in:
@@ -285,7 +285,6 @@ static void drm_minor_free(struct drm_device *dev, unsigned int type)
|
||||
if (!minor)
|
||||
return;
|
||||
|
||||
drm_mode_group_destroy(&minor->mode_group);
|
||||
put_device(minor->kdev);
|
||||
|
||||
spin_lock_irqsave(&drm_minor_lock, flags);
|
||||
@@ -705,20 +704,9 @@ int drm_dev_register(struct drm_device *dev, unsigned long flags)
|
||||
goto err_minors;
|
||||
}
|
||||
|
||||
/* setup grouping for legacy outputs */
|
||||
if (drm_core_check_feature(dev, DRIVER_MODESET)) {
|
||||
ret = drm_mode_group_init_legacy_group(dev,
|
||||
&dev->primary->mode_group);
|
||||
if (ret)
|
||||
goto err_unload;
|
||||
}
|
||||
|
||||
ret = 0;
|
||||
goto out_unlock;
|
||||
|
||||
err_unload:
|
||||
if (dev->driver->unload)
|
||||
dev->driver->unload(dev);
|
||||
err_minors:
|
||||
drm_minor_unregister(dev, DRM_MINOR_LEGACY);
|
||||
drm_minor_unregister(dev, DRM_MINOR_RENDER);
|
||||
|
||||
Reference in New Issue
Block a user