Skip to contentSkip to conversation

C99 initiailzers for kernel/resource.c

PATCH New Art Haas 1 participant 1 message Feb 12, 2003

lore
Share & tools
lore

Art Haas

author
#0 lore raw

PATCH 1/1 C99 initiailzers for kernel/resource.c

Hi.

This patch converts the file to use C99 initializers to remove warnings if '-W' is used and aid readability.

Art Haas

===== kernel/resource.c 1.8 vs edited =====

kernel/resource.c +13 -2
@@ -15,8 +15,19 @@
 #include <linux/spinlock.h>
 #include <asm/io.h>
 
-struct resource ioport_resource = { "PCI IO", 0x0000, IO_SPACE_LIMIT, IORESOURCE_IO };
-struct resource iomem_resource = { "PCI mem", 0x00000000, 0xffffffff, IORESOURCE_MEM };
+struct resource ioport_resource = {
+	.name	= "PCI IO",
+	.start	= 0x0000,
+	.end	= IO_SPACE_LIMIT,
+	.flags	= IORESOURCE_IO
+};
+
+struct resource iomem_resource = {
+	.name	= "PCI mem",
+	.start	= 0x00000000,
+	.end	= 0xffffffff,
+	.flags	= IORESOURCE_MEM
+};
 
 static rwlock_t resource_lock = RW_LOCK_UNLOCKED;
 
Signature · 3 lines
They that can give up essential liberty to obtain a little temporary safety
deserve neither liberty nor safety.
 -- Benjamin Franklin, Historical Review of Pennsylvania, 1759