]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/kernel/dma-isa.c
[ARM] Convert asm/io.h to linux/io.h
[linux-2.6-omap-h63xx.git] / arch / arm / kernel / dma-isa.c
index 03532769a97f38840bea46f2969c914d857eb9d4..4a3a50495c60778c813acbf192b1fa16475a995d 100644 (file)
 #include <linux/ioport.h>
 #include <linux/init.h>
 #include <linux/dma-mapping.h>
+#include <linux/io.h>
 
 #include <asm/dma.h>
-#include <asm/io.h>
-
 #include <asm/mach/dma.h>
 
 #define ISA_DMA_MODE_READ      0x44
@@ -143,12 +142,23 @@ static struct dma_ops isa_dma_ops = {
        .residue        = isa_get_dma_residue,
 };
 
-static struct resource dma_resources[] = {
-       { "dma1",               0x0000, 0x000f },
-       { "dma low page",       0x0080, 0x008f },
-       { "dma2",               0x00c0, 0x00df },
-       { "dma high page",      0x0480, 0x048f }
-};
+static struct resource dma_resources[] = { {
+       .name   = "dma1",
+       .start  = 0x0000,
+       .end    = 0x000f
+}, {
+       .name   = "dma low page",
+       .start  = 0x0080,
+       .end    = 0x008f
+}, {
+       .name   = "dma2",
+       .start  = 0x00c0,
+       .end    = 0x00df
+}, {
+       .name   = "dma high page",
+       .start  = 0x0480,
+       .end    = 0x048f
+} };
 
 void __init isa_init_dma(dma_t *dma)
 {
@@ -205,7 +215,7 @@ void __init isa_init_dma(dma_t *dma)
 
                request_dma(DMA_ISA_CASCADE, "cascade");
 
-               for (i = 0; i < sizeof(dma_resources) / sizeof(dma_resources[0]); i++)
+               for (i = 0; i < ARRAY_SIZE(dma_resources); i++)
                        request_resource(&ioport_resource, dma_resources + i);
        }
 }