dma-debug: fix displaying of dma allocation type
[linux-2.6-microblaze.git] / kernel / dma / debug.c
index 2031ed1..9e1777c 100644 (file)
@@ -137,9 +137,12 @@ static const char *const maperr2str[] = {
        [MAP_ERR_CHECKED] = "dma map error checked",
 };
 
-static const char *type2name[5] = { "single", "page",
-                                   "scather-gather", "coherent",
-                                   "resource" };
+static const char *type2name[] = {
+       [dma_debug_single] = "single",
+       [dma_debug_sg] = "scather-gather",
+       [dma_debug_coherent] = "coherent",
+       [dma_debug_resource] = "resource",
+};
 
 static const char *dir2name[4] = { "DMA_BIDIRECTIONAL", "DMA_TO_DEVICE",
                                   "DMA_FROM_DEVICE", "DMA_NONE" };