]> Pileus Git - ~andy/linux/blobdiff - drivers/gpu/drm/drm_stub.c
Merge branch 'drm-intel-next' of git://people.freedesktop.org/~danvet/drm-intel into...
[~andy/linux] / drivers / gpu / drm / drm_stub.c
index 82141e6e8ac842fb73d8501ee2dac5eab9bdb053..98a33c580ca1aeceed513f2af38b6742cee30f85 100644 (file)
@@ -527,13 +527,10 @@ int drm_dev_register(struct drm_device *dev, unsigned long flags)
 
        mutex_lock(&drm_global_mutex);
 
-       if (dev->driver->bus->agp_init)
-               dev->driver->bus->agp_init(dev);
-
        if (drm_core_check_feature(dev, DRIVER_MODESET)) {
                ret = drm_get_minor(dev, &dev->control, DRM_MINOR_CONTROL);
                if (ret)
-                       goto err_agp;
+                       goto out_unlock;
        }
 
        if (drm_core_check_feature(dev, DRIVER_RENDER) && drm_rnodes) {
@@ -567,14 +564,11 @@ err_unload:
        if (dev->driver->unload)
                dev->driver->unload(dev);
 err_primary_node:
-       drm_put_minor(dev->primary);
+       drm_unplug_minor(dev->primary);
 err_render_node:
-       drm_put_minor(dev->render);
+       drm_unplug_minor(dev->render);
 err_control_node:
-       drm_put_minor(dev->control);
-err_agp:
-       if (dev->driver->bus->agp_destroy)
-               dev->driver->bus->agp_destroy(dev);
+       drm_unplug_minor(dev->control);
 out_unlock:
        mutex_unlock(&drm_global_mutex);
        return ret;
@@ -598,8 +592,8 @@ void drm_dev_unregister(struct drm_device *dev)
        if (dev->driver->unload)
                dev->driver->unload(dev);
 
-       if (dev->driver->bus->agp_destroy)
-               dev->driver->bus->agp_destroy(dev);
+       if (dev->agp)
+               drm_pci_agp_destroy(dev);
 
        drm_vblank_cleanup(dev);