summaryrefslogtreecommitdiff
path: root/linux-core/drm_stub.c
diff options
context:
space:
mode:
authorJerome Glisse <glisse@freedesktop.org>2008-03-10 23:36:27 +0100
committerJohn Doe <glisse@freedesktop.org>2008-03-10 23:36:27 +0100
commita7e6ca62ad0d9c3c45fd9e1d81b59c2db2d714cf (patch)
tree8f757eeaa2c234af14ca1df515de7810e770ed91 /linux-core/drm_stub.c
parenta7dc4d08b9b4f8fe6fcaa4c778f6dd3718d1e36a (diff)
parent9f19e79f955281b9de393219e4ad9835ffe29c49 (diff)
Merge branch 'modesetting-101' of ssh://git.freedesktop.org/git/mesa/drm into modesetting-101
Diffstat (limited to 'linux-core/drm_stub.c')
-rw-r--r--linux-core/drm_stub.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/linux-core/drm_stub.c b/linux-core/drm_stub.c
index 334c8f03..6856075b 100644
--- a/linux-core/drm_stub.c
+++ b/linux-core/drm_stub.c
@@ -343,8 +343,10 @@ int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent,
goto err_g3;
}
- if ((ret = drm_get_minor(dev, &dev->control, DRM_MINOR_CONTROL)))
- goto err_g3;
+ /* only add the control node on a modesetting platform */
+ if (drm_core_check_feature(dev, DRIVER_MODESET))
+ if ((ret = drm_get_minor(dev, &dev->control, DRM_MINOR_CONTROL)))
+ goto err_g3;
if ((ret = drm_get_minor(dev, &dev->primary, DRM_MINOR_LEGACY)))
goto err_g4;
@@ -361,7 +363,8 @@ int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent,
err_g5:
drm_put_minor(&dev->primary);
err_g4:
- drm_put_minor(&dev->control);
+ if (drm_core_check_feature(dev, DRIVER_MODESET))
+ drm_put_minor(&dev->control);
err_g3:
if (!drm_fb_loaded)
pci_disable_device(pdev);