[2.6 patch] arch/arm/kernel/dma-isa.c: named initializers

[2.6 patch] arch/arm/kernel/dma-isa.c: named initializers

Post by Adrian Bun » Tue, 02 May 2006 16:20:12


This patch converts struct dma_resources to named initializers.

Besides fixing a compile error in -mm, it didn't sound like a bad idea.

Signed-off-by: Adrian Bunk < XXXX@XXXXX.COM >

--- linux-2.6.17-rc2-mm1-shark/arch/arm/kernel/dma-isa.c.old 2006-04-27 22:44:38.000000000 +0200
+++ linux-2.6.17-rc2-mm1-shark/arch/arm/kernel/dma-isa.c 2006-04-27 22:44:23.000000000 +0200
@@ -143,12 +143,23 @@
.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)
{

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to XXXX@XXXXX.COM
More majordomo info at http://www.yqcomputer.com/
Please read the FAQ at http://www.yqcomputer.com/
 
 
 

[2.6 patch] arch/arm/kernel/dma-isa.c: named initializers

Post by Adrian Bun » Thu, 18 May 2006 02:50:07

This patch converts struct dma_resources to named initializers.

Besides fixing a compile error in -mm, it didn't sound like a bad idea.

Signed-off-by: Adrian Bunk < XXXX@XXXXX.COM >
Acked-by: Alexander Schulz < XXXX@XXXXX.COM >

---

This patch was already sent on:
- 1 May 2006

--- linux-2.6.17-rc2-mm1-shark/arch/arm/kernel/dma-isa.c.old 2006-04-27 22:44:38.000000000 +0200
+++ linux-2.6.17-rc2-mm1-shark/arch/arm/kernel/dma-isa.c 2006-04-27 22:44:23.000000000 +0200
@@ -143,12 +143,23 @@
.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)
{

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to XXXX@XXXXX.COM
More majordomo info at http://www.yqcomputer.com/
Please read the FAQ at http://www.yqcomputer.com/