From dc338921f94daad17055105a38214483d5ac33e1 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 29 Nov 2007 09:37:51 +1000 Subject: drm: more cleanups --- linux-core/drm_agpsupport.c | 4 ++-- linux-core/drm_ioctl.c | 16 ++++++++++------ linux-core/i915_buffer.c | 2 +- 3 files changed, 13 insertions(+), 9 deletions(-) (limited to 'linux-core') diff --git a/linux-core/drm_agpsupport.c b/linux-core/drm_agpsupport.c index cb665009..b5dcbb35 100644 --- a/linux-core/drm_agpsupport.c +++ b/linux-core/drm_agpsupport.c @@ -522,7 +522,7 @@ static int drm_agp_populate(struct drm_ttm_backend *backend, mem = drm_agp_allocate_memory(agp_be->bridge, num_pages, AGP_USER_MEMORY); #endif if (!mem) { - drm_free_memctl(num_pages * sizeof(void *)); + drm_free_memctl(num_pages *sizeof(void *)); return -1; } @@ -652,7 +652,7 @@ struct drm_ttm_backend *drm_agp_init_ttm(struct drm_device *dev) EXPORT_SYMBOL(drm_agp_init_ttm); #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25) -void drm_agp_flush_chipset(struct drm_device *dev) +void drm_agp_chipset_flush(struct drm_device *dev) { agp_flush_chipset(dev->agp->bridge); } diff --git a/linux-core/drm_ioctl.c b/linux-core/drm_ioctl.c index 395f7b4e..3df163db 100644 --- a/linux-core/drm_ioctl.c +++ b/linux-core/drm_ioctl.c @@ -98,12 +98,14 @@ int drm_setunique(struct drm_device *dev, void *data, dev->unique[dev->unique_len] = '\0'; - dev->devname = drm_alloc(strlen(dev->driver->pci_driver.name) + strlen(dev->unique) + 2, - DRM_MEM_DRIVER); + dev->devname = + drm_alloc(strlen(dev->driver->pci_driver.name) + + strlen(dev->unique) + 2, DRM_MEM_DRIVER); if (!dev->devname) return -ENOMEM; - sprintf(dev->devname, "%s@%s", dev->driver->pci_driver.name, dev->unique); + sprintf(dev->devname, "%s@%s", dev->driver->pci_driver.name, + dev->unique); /* Return error if the busid submitted doesn't match the device's actual * busid. @@ -142,12 +144,14 @@ static int drm_set_busid(struct drm_device * dev) if (len > dev->unique_len) DRM_ERROR("buffer overflow"); - dev->devname = drm_alloc(strlen(dev->driver->pci_driver.name) + dev->unique_len + 2, - DRM_MEM_DRIVER); + dev->devname = + drm_alloc(strlen(dev->driver->pci_driver.name) + dev->unique_len + + 2, DRM_MEM_DRIVER); if (dev->devname == NULL) return -ENOMEM; - sprintf(dev->devname, "%s@%s", dev->driver->pci_driver.name, dev->unique); + sprintf(dev->devname, "%s@%s", dev->driver->pci_driver.name, + dev->unique); return 0; } diff --git a/linux-core/i915_buffer.c b/linux-core/i915_buffer.c index fb063ee7..b000a725 100644 --- a/linux-core/i915_buffer.c +++ b/linux-core/i915_buffer.c @@ -277,7 +277,7 @@ void i915_flush_ttm(struct drm_ttm *ttm) return; DRM_MEMORYBARRIER(); - for (i = ttm->num_pages-1; i >= 0; i--) + for (i = ttm->num_pages - 1; i >= 0; i--) drm_cache_flush_page(drm_ttm_get_page(ttm, i)); DRM_MEMORYBARRIER(); } -- cgit v1.2.3