Commit 819beac3 authored by Bjorn Helgaas's avatar Bjorn Helgaas Committed by Andi Kleen

PNP: in debug resource dump, make empty list obvious

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: default avatarBjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
Acked-by: default avatarRene Herman <rene.herman@gmail.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent fcfb7ce3
...@@ -79,7 +79,12 @@ void dbg_pnp_show_resources(struct pnp_dev *dev, char *desc) ...@@ -79,7 +79,12 @@ void dbg_pnp_show_resources(struct pnp_dev *dev, char *desc)
struct pnp_resource *pnp_res; struct pnp_resource *pnp_res;
struct resource *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) { list_for_each_entry(pnp_res, &dev->resources, list) {
res = &pnp_res->res; res = &pnp_res->res;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment