diff options
Diffstat (limited to 'drivers/pnp/interface.c')
-rw-r--r-- | drivers/pnp/interface.c | 60 |
1 files changed, 26 insertions, 34 deletions
diff --git a/drivers/pnp/interface.c b/drivers/pnp/interface.c index 3f8007ab94e3..7fc86bbed88e 100644 --- a/drivers/pnp/interface.c +++ b/drivers/pnp/interface.c | |||
@@ -269,46 +269,38 @@ static ssize_t pnp_show_current_resources(struct device *dmdev, | |||
269 | pnp_printf(buffer, "disabled\n"); | 269 | pnp_printf(buffer, "disabled\n"); |
270 | 270 | ||
271 | for (i = 0; (res = pnp_get_resource(dev, IORESOURCE_IO, i)); i++) { | 271 | for (i = 0; (res = pnp_get_resource(dev, IORESOURCE_IO, i)); i++) { |
272 | if (pnp_resource_valid(res)) { | 272 | pnp_printf(buffer, "io"); |
273 | pnp_printf(buffer, "io"); | 273 | if (res->flags & IORESOURCE_DISABLED) |
274 | if (res->flags & IORESOURCE_DISABLED) | 274 | pnp_printf(buffer, " disabled\n"); |
275 | pnp_printf(buffer, " disabled\n"); | 275 | else |
276 | else | 276 | pnp_printf(buffer, " 0x%llx-0x%llx\n", |
277 | pnp_printf(buffer, " 0x%llx-0x%llx\n", | 277 | (unsigned long long) res->start, |
278 | (unsigned long long) res->start, | 278 | (unsigned long long) res->end); |
279 | (unsigned long long) res->end); | ||
280 | } | ||
281 | } | 279 | } |
282 | for (i = 0; (res = pnp_get_resource(dev, IORESOURCE_MEM, i)); i++) { | 280 | for (i = 0; (res = pnp_get_resource(dev, IORESOURCE_MEM, i)); i++) { |
283 | if (pnp_resource_valid(res)) { | 281 | pnp_printf(buffer, "mem"); |
284 | pnp_printf(buffer, "mem"); | 282 | if (res->flags & IORESOURCE_DISABLED) |
285 | if (res->flags & IORESOURCE_DISABLED) | 283 | pnp_printf(buffer, " disabled\n"); |
286 | pnp_printf(buffer, " disabled\n"); | 284 | else |
287 | else | 285 | pnp_printf(buffer, " 0x%llx-0x%llx\n", |
288 | pnp_printf(buffer, " 0x%llx-0x%llx\n", | 286 | (unsigned long long) res->start, |
289 | (unsigned long long) res->start, | 287 | (unsigned long long) res->end); |
290 | (unsigned long long) res->end); | ||
291 | } | ||
292 | } | 288 | } |
293 | for (i = 0; (res = pnp_get_resource(dev, IORESOURCE_IRQ, i)); i++) { | 289 | for (i = 0; (res = pnp_get_resource(dev, IORESOURCE_IRQ, i)); i++) { |
294 | if (pnp_resource_valid(res)) { | 290 | pnp_printf(buffer, "irq"); |
295 | pnp_printf(buffer, "irq"); | 291 | if (res->flags & IORESOURCE_DISABLED) |
296 | if (res->flags & IORESOURCE_DISABLED) | 292 | pnp_printf(buffer, " disabled\n"); |
297 | pnp_printf(buffer, " disabled\n"); | 293 | else |
298 | else | 294 | pnp_printf(buffer, " %lld\n", |
299 | pnp_printf(buffer, " %lld\n", | 295 | (unsigned long long) res->start); |
300 | (unsigned long long) res->start); | ||
301 | } | ||
302 | } | 296 | } |
303 | for (i = 0; (res = pnp_get_resource(dev, IORESOURCE_DMA, i)); i++) { | 297 | for (i = 0; (res = pnp_get_resource(dev, IORESOURCE_DMA, i)); i++) { |
304 | if (pnp_resource_valid(res)) { | 298 | pnp_printf(buffer, "dma"); |
305 | pnp_printf(buffer, "dma"); | 299 | if (res->flags & IORESOURCE_DISABLED) |
306 | if (res->flags & IORESOURCE_DISABLED) | 300 | pnp_printf(buffer, " disabled\n"); |
307 | pnp_printf(buffer, " disabled\n"); | 301 | else |
308 | else | 302 | pnp_printf(buffer, " %lld\n", |
309 | pnp_printf(buffer, " %lld\n", | 303 | (unsigned long long) res->start); |
310 | (unsigned long long) res->start); | ||
311 | } | ||
312 | } | 304 | } |
313 | ret = (buffer->curr - buf); | 305 | ret = (buffer->curr - buf); |
314 | kfree(buffer); | 306 | kfree(buffer); |