Merge branch 'drm-patches' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
[pandora-kernel.git] / drivers / char / drm / drm_stub.c
index 9a842a3..5fd6dc0 100644 (file)
@@ -60,27 +60,29 @@ static int drm_fill_in_dev(drm_device_t * dev, struct pci_dev *pdev,
        int retcode;
 
        spin_lock_init(&dev->count_lock);
+       spin_lock_init(&dev->drw_lock);
+       spin_lock_init(&dev->tasklet_lock);
        init_timer(&dev->timer);
        mutex_init(&dev->struct_mutex);
        mutex_init(&dev->ctxlist_mutex);
 
        dev->pdev = pdev;
+       dev->pci_device = pdev->device;
+       dev->pci_vendor = pdev->vendor;
 
 #ifdef __alpha__
        dev->hose = pdev->sysdata;
-       dev->pci_domain = dev->hose->bus->number;
-#else
-       dev->pci_domain = 0;
 #endif
-       dev->pci_bus = pdev->bus->number;
-       dev->pci_slot = PCI_SLOT(pdev->devfn);
-       dev->pci_func = PCI_FUNC(pdev->devfn);
        dev->irq = pdev->irq;
 
        dev->maplist = drm_calloc(1, sizeof(*dev->maplist), DRM_MEM_MAPS);
        if (dev->maplist == NULL)
                return -ENOMEM;
        INIT_LIST_HEAD(&dev->maplist->head);
+       if (drm_ht_create(&dev->map_hash, 12)) {
+               drm_free(dev->maplist, sizeof(*dev->maplist), DRM_MEM_MAPS);
+               return -ENOMEM;
+       }
 
        /* the DRM has 6 basic counters */
        dev->counters = 6;