return from;
}
+/* Warning: This function uses a static buffer. Don't call it more than once
+ * from the same print statement! */
const char *dev_path(device_t dev)
{
sprintf(buffer, "CPU_BUS: %02x", dev->path.cpu_bus.id);
break;
default:
- printk_err("Unknown device path type: %d\n", dev->path.type);
+ printk(BIOS_ERR, "Unknown device path type: %d\n", dev->path.type);
break;
}
}
const char *bus_path(struct bus *bus)
{
static char buffer[BUS_PATH_MAX];
- sprintf(buffer, "%s,%d",
- dev_path(bus->dev), bus->link);
+ sprintf(buffer, "%s,%d", dev_path(bus->dev), bus->link);
return buffer;
}
equal = (path1->cpu_bus.id == path2->cpu_bus.id);
break;
default:
- printk_err("Uknown device type: %d\n", path1->type);
+ printk(BIOS_ERR, "Uknown device type: %d\n", path1->type);
break;
}
}
/* See if there is a resource with the appropriate index */
resource = probe_resource(dev, index);
if (!resource) {
- printk_emerg("%s missing resource: %02x\n",
+ printk(BIOS_EMERG, "%s missing resource: %02x\n",
dev_path(dev), index);
die("");
}
sprintf(buf, "bus %02x ", dev->link[0].secondary);
#endif
}
- printk_debug(
+ printk(BIOS_DEBUG,
"%s %02lx <- [0x%010Lx - 0x%010Lx] size 0x%08Lx gran 0x%02x %s%s%s\n",
dev_path(dev),
resource->index,
for(curdev = bus->children; curdev; curdev = curdev->sibling) {
int i;
/* Ignore disabled devices */
- if (!curdev->have_resources) continue;
+ if (!curdev->enabled) continue;
for(i = 0; i < curdev->resources; i++) {
struct resource *resource = &curdev->resource[i];
/* If it isn't the right kind of resource ignore it */
for(curdev = all_devices; curdev; curdev = curdev->next) {
int i;
/* Ignore disabled devices */
- if (!curdev->have_resources) continue;
+ if (!curdev->enabled) continue;
for(i = 0; i < curdev->resources; i++) {
struct resource *resource = &curdev->resource[i];
/* If it isn't the right kind of resource ignore it */
}
}
-void resource_tree(struct device *root, int debug_level, int depth)
+static void resource_tree(struct device *root, int debug_level, int depth)
{
int i = 0, link = 0;
struct device *child;
indent[i] = ' ';
indent[i] = '\0';
- do_printk(BIOS_DEBUG, "%s%s links %x child on link 0 %s\n",
- indent, dev_path(root), root->links,
- root->link[0].children ? dev_path(root->link[0].children) :
- "NULL");
+ do_printk(BIOS_DEBUG, "%s%s links %x child on link 0", indent,
+ dev_path(root), root->links);
+ do_printk(BIOS_DEBUG, " %s\n", root->link[0].children ?
+ dev_path(root->link[0].children) : "NULL");
for (i = 0; i < root->resources; i++) {
do_printk(BIOS_DEBUG,
"%s%s resource base %llx size %llx align %d gran %d limit %llx flags %lx index %lx\n",