aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2008-12-06 21:02:21 -0500
committerDave Airlie <airlied@linux.ie>2008-12-29 02:47:22 -0500
commita9d51a5ad1154b5b20add1e8d30a5564f8aabbe9 (patch)
tree10318d54dc1ab138f2a864c00feb30c619b1b208 /drivers/gpu
parent1147c9cdd0f60f09a98702a9f865176af18a989f (diff)
drm: reorganise start and load.
Make sure we have the primary node so the device can add maps. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/drm_stub.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c
index f7985c303cb0..ea7f9e5d47fa 100644
--- a/drivers/gpu/drm/drm_stub.c
+++ b/drivers/gpu/drm/drm_stub.c
@@ -237,9 +237,6 @@ static int drm_fill_in_dev(struct drm_device * dev, struct pci_dev *pdev,
237 } 237 }
238 } 238 }
239 239
240 if (dev->driver->load)
241 if ((retcode = dev->driver->load(dev, ent->driver_data)))
242 goto error_out_unreg;
243 240
244 retcode = drm_ctxbitmap_init(dev); 241 retcode = drm_ctxbitmap_init(dev);
245 if (retcode) { 242 if (retcode) {
@@ -368,6 +365,10 @@ int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent,
368 if ((ret = drm_get_minor(dev, &dev->primary, DRM_MINOR_LEGACY))) 365 if ((ret = drm_get_minor(dev, &dev->primary, DRM_MINOR_LEGACY)))
369 goto err_g2; 366 goto err_g2;
370 367
368 if (dev->driver->load)
369 if ((ret = dev->driver->load(dev, ent->driver_data)))
370 goto err_g3;
371
371 list_add_tail(&dev->driver_item, &driver->device_list); 372 list_add_tail(&dev->driver_item, &driver->device_list);
372 373
373 DRM_INFO("Initialized %s %d.%d.%d %s on minor %d\n", 374 DRM_INFO("Initialized %s %d.%d.%d %s on minor %d\n",
@@ -376,6 +377,8 @@ int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent,
376 377
377 return 0; 378 return 0;
378 379
380err_g3:
381 drm_put_minor(&dev->primary);
379err_g2: 382err_g2:
380 pci_disable_device(pdev); 383 pci_disable_device(pdev);
381err_g1: 384err_g1: