 dev->maplist = drm_calloc(1, sizeof(*dev->maplist), DRM_MEM_MAPS); if (dev->maplist == NULL) return -ENOMEM; INIT_LIST_HEAD(&dev->maplist->head); 
static int drm_fill_in_dev(drm_device_t *dev, struct pci_dev *pdev, const struct pci_device_id *ent, struct drm_driver *driver){	int retcode;	spin_lock_init(&dev->count_lock);	init_timer( &dev->timer );	sema_init( &dev->struct_sem, 1 );	sema_init( &dev->ctxlist_sem, 1 );	dev->pdev   = pdev;#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;	/* the DRM has 6 basic counters */	dev->counters = 6;	dev->types[0]  = _DRM_STAT_LOCK;	dev->types[1]  = _DRM_STAT_OPENS;	dev->types[2]  = _DRM_STAT_CLOSES;	dev->types[3]  = _DRM_STAT_IOCTLS;	dev->types[4]  = _DRM_STAT_LOCKS;	dev->types[5]  = _DRM_STAT_UNLOCKS;	dev->driver = driver;		if (dev->driver->preinit)		if ((retcode = dev->driver->preinit(dev, ent->driver_data)))			goto error_out_unreg;	if (drm_core_has_AGP(dev)) {		if (drm_device_is_agp(dev))			dev->agp = drm_agp_init(dev);		if (drm_core_check_feature(dev, DRIVER_REQUIRE_AGP) && (dev->agp == NULL)) {			DRM_ERROR( "Cannot initialize the agpgart module.\n" );			retcode = -EINVAL;			goto error_out_unreg;		}		if (drm_core_has_MTRR(dev)) {			if (dev->agp)				dev->agp->agp_mtrr = mtrr_add( dev->agp->agp_info.aper_base,							       dev->agp->agp_info.aper_size*1024*1024,							       MTRR_TYPE_WRCOMB,							       1 );		}	}	retcode = drm_ctxbitmap_init( dev );	if( retcode ) {		DRM_ERROR( "Cannot allocate memory for context bitmap.\n" );		goto error_out_unreg;	}	return 0;	error_out_unreg:	drm_takedown(dev);	return retcode;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/836cf0465c422ee6d654060edd7c620d9cf0c09c/drm_stub.c/clean/drivers/char/drm/drm_stub.c