patch-2.4.5 linux/kernel/resource.c

Next file: linux/mm/bootmem.c
Previous file: linux/kernel/module.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.4/linux/kernel/resource.c linux/kernel/resource.c
@@ -297,20 +297,23 @@
 #define MAXRESERVE 4
 static int __init reserve_setup(char *str)
 {
-	int opt = 2, io_start, io_num;
 	static int reserved = 0;
 	static struct resource reserve[MAXRESERVE];
 
-    while (opt==2) {
+	for (;;) {
+		int io_start, io_num;
 		int x = reserved;
 
-        if (get_option (&str, &io_start) != 2) break;
-        if (get_option (&str, &io_num)   == 0) break;
+		if (get_option (&str, &io_start) != 2)
+			break;
+		if (get_option (&str, &io_num)   == 0)
+			break;
 		if (x < MAXRESERVE) {
 			struct resource *res = reserve + x;
 			res->name = "reserved";
 			res->start = io_start;
 			res->end = io_start + io_num - 1;
+			res->flags = IORESOURCE_BUSY;
 			res->child = NULL;
 			if (request_resource(res->start >= 0x10000 ? &iomem_resource : &ioport_resource, res) == 0)
 				reserved = x+1;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)