]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
PNP: in debug resource dump, make empty list obvious
authorBjorn Helgaas <bjorn.helgaas@hp.com>
Fri, 27 Jun 2008 22:57:08 +0000 (16:57 -0600)
committerAndi Kleen <andi@basil.nowhere.org>
Wed, 16 Jul 2008 21:27:06 +0000 (23:27 +0200)
If the resource list is empty, say that explicitly.  Previously,
it was confusing because often the heading was followed by zero
resource lines, then some "add resource" lines from auto-assignment,
so the "add" lines looked like current resources.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Rene Herman <rene.herman@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/pnp/support.c

index 1566e4a738491178e4268aa73f237aad14ee0a5f..0ad42db948843ed4a761ff50367d02a3c309195b 100644 (file)
@@ -79,7 +79,12 @@ void dbg_pnp_show_resources(struct pnp_dev *dev, char *desc)
        struct pnp_resource *pnp_res;
        struct resource *res;
 
-       dev_dbg(&dev->dev, "current resources: %s\n", desc);
+       if (list_empty(&dev->resources)) {
+               dev_dbg(&dev->dev, "%s: no current resources\n", desc);
+               return;
+       }
+
+       dev_dbg(&dev->dev, "%s: current resources:\n", desc);
        list_for_each_entry(pnp_res, &dev->resources, list) {
                res = &pnp_res->res;