pnpacpi: print resource shortage message only once (more)
Len Brown [Thu, 17 Jan 2008 23:21:10 +0000 (15:21 -0800)]
Wups, previous patch was ineffective in 2 cases.

http://bugzilla.kernel.org/show_bug.cgi?id=9535

Signed-off-by: Len Brown <len.brown@intel.com>
Reported-by: "Hartkopp, Oliver (K-EFE/E)" <oliver.hartkopp@volkswagen.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

drivers/pnp/pnpacpi/rsparser.c

index f7b8648..6b9840c 100644 (file)
@@ -215,6 +215,7 @@ static void pnpacpi_parse_allocated_ioresource(struct pnp_resource_table *res,
        } else if (!warned) {
                printk(KERN_ERR "pnpacpi: exceeded the max number of IO "
                                "resources: %d \n", PNP_MAX_PORT);
+               warned = 1;
        }
 }
 
@@ -242,6 +243,7 @@ static void pnpacpi_parse_allocated_memresource(struct pnp_resource_table *res,
        } else if (!warned) {
                printk(KERN_ERR "pnpacpi: exceeded the max number of mem "
                                "resources: %d\n", PNP_MAX_MEM);
+               warned = 1;
        }
 }