aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/drm/drm_pci.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/char/drm/drm_pci.c b/drivers/char/drm/drm_pci.c
index 3e452e8967fa..09ed712c1a7f 100644
--- a/drivers/char/drm/drm_pci.c
+++ b/drivers/char/drm/drm_pci.c
@@ -50,7 +50,7 @@ drm_dma_handle_t *drm_pci_alloc(drm_device_t * dev, size_t size, size_t align,
50 dma_addr_t maxaddr) 50 dma_addr_t maxaddr)
51{ 51{
52 drm_dma_handle_t *dmah; 52 drm_dma_handle_t *dmah;
53#if DRM_DEBUG_MEMORY 53#ifdef DRM_DEBUG_MEMORY
54 int area = DRM_MEM_DMA; 54 int area = DRM_MEM_DMA;
55 55
56 spin_lock(&drm_mem_lock); 56 spin_lock(&drm_mem_lock);
@@ -81,7 +81,7 @@ drm_dma_handle_t *drm_pci_alloc(drm_device_t * dev, size_t size, size_t align,
81 dmah->size = size; 81 dmah->size = size;
82 dmah->vaddr = pci_alloc_consistent(dev->pdev, size, &dmah->busaddr); 82 dmah->vaddr = pci_alloc_consistent(dev->pdev, size, &dmah->busaddr);
83 83
84#if DRM_DEBUG_MEMORY 84#ifdef DRM_DEBUG_MEMORY
85 if (dmah->vaddr == NULL) { 85 if (dmah->vaddr == NULL) {
86 spin_lock(&drm_mem_lock); 86 spin_lock(&drm_mem_lock);
87 ++drm_mem_stats[area].fail_count; 87 ++drm_mem_stats[area].fail_count;
@@ -116,14 +116,14 @@ EXPORT_SYMBOL(drm_pci_alloc);
116void 116void
117__drm_pci_free(drm_device_t * dev, drm_dma_handle_t *dmah) 117__drm_pci_free(drm_device_t * dev, drm_dma_handle_t *dmah)
118{ 118{
119#if DRM_DEBUG_MEMORY 119#ifdef DRM_DEBUG_MEMORY
120 int area = DRM_MEM_DMA; 120 int area = DRM_MEM_DMA;
121 int alloc_count; 121 int alloc_count;
122 int free_count; 122 int free_count;
123#endif 123#endif
124 124
125 if (!dmah->vaddr) { 125 if (!dmah->vaddr) {
126#if DRM_DEBUG_MEMORY 126#ifdef DRM_DEBUG_MEMORY
127 DRM_MEM_ERROR(area, "Attempt to free address 0\n"); 127 DRM_MEM_ERROR(area, "Attempt to free address 0\n");
128#endif 128#endif
129 } else { 129 } else {
@@ -131,7 +131,7 @@ __drm_pci_free(drm_device_t * dev, drm_dma_handle_t *dmah)
131 dmah->busaddr); 131 dmah->busaddr);
132 } 132 }
133 133
134#if DRM_DEBUG_MEMORY 134#ifdef DRM_DEBUG_MEMORY
135 spin_lock(&drm_mem_lock); 135 spin_lock(&drm_mem_lock);
136 free_count = ++drm_mem_stats[area].free_count; 136 free_count = ++drm_mem_stats[area].free_count;
137 alloc_count = drm_mem_stats[area].succeed_count; 137 alloc_count = drm_mem_stats[area].succeed_count;