- for (i = 0; (res = pnp_get_resource(dev, IORESOURCE_IO, i)); i++) {
- pnp_printf(buffer, "io");
- if (res->flags & IORESOURCE_DISABLED)
- pnp_printf(buffer, " disabled\n");
- else
- pnp_printf(buffer, " 0x%llx-0x%llx\n",
- (unsigned long long) res->start,
- (unsigned long long) res->end);
- }
- for (i = 0; (res = pnp_get_resource(dev, IORESOURCE_MEM, i)); i++) {
- pnp_printf(buffer, "mem");
- if (res->flags & IORESOURCE_DISABLED)
+ list_for_each_entry(pnp_res, &dev->resources, list) {
+ res = &pnp_res->res;
+
+ pnp_printf(buffer, pnp_resource_type_name(res));
+
+ if (res->flags & IORESOURCE_DISABLED) {