diff options
Diffstat (limited to 'drivers/pnp/support.c')
-rw-r--r-- | drivers/pnp/support.c | 43 |
1 files changed, 5 insertions, 38 deletions
diff --git a/drivers/pnp/support.c b/drivers/pnp/support.c index 63087d5ce609..1f8a33b0abac 100644 --- a/drivers/pnp/support.c +++ b/drivers/pnp/support.c | |||
@@ -75,47 +75,14 @@ char *pnp_resource_type_name(struct resource *res) | |||
75 | 75 | ||
76 | void dbg_pnp_show_resources(struct pnp_dev *dev, char *desc) | 76 | void dbg_pnp_show_resources(struct pnp_dev *dev, char *desc) |
77 | { | 77 | { |
78 | char buf[128]; | ||
79 | int len; | ||
80 | struct pnp_resource *pnp_res; | 78 | struct pnp_resource *pnp_res; |
81 | struct resource *res; | ||
82 | 79 | ||
83 | if (list_empty(&dev->resources)) { | 80 | if (list_empty(&dev->resources)) |
84 | pnp_dbg(&dev->dev, "%s: no current resources\n", desc); | 81 | pnp_dbg(&dev->dev, "%s: no current resources\n", desc); |
85 | return; | 82 | else { |
86 | } | 83 | pnp_dbg(&dev->dev, "%s: current resources:\n", desc); |
87 | 84 | list_for_each_entry(pnp_res, &dev->resources, list) | |
88 | pnp_dbg(&dev->dev, "%s: current resources:\n", desc); | 85 | pnp_dbg(&dev->dev, "%pRf\n", &pnp_res->res); |
89 | list_for_each_entry(pnp_res, &dev->resources, list) { | ||
90 | res = &pnp_res->res; | ||
91 | len = 0; | ||
92 | |||
93 | len += scnprintf(buf + len, sizeof(buf) - len, " %-3s ", | ||
94 | pnp_resource_type_name(res)); | ||
95 | |||
96 | if (res->flags & IORESOURCE_DISABLED) { | ||
97 | pnp_dbg(&dev->dev, "%sdisabled\n", buf); | ||
98 | continue; | ||
99 | } | ||
100 | |||
101 | switch (pnp_resource_type(res)) { | ||
102 | case IORESOURCE_IO: | ||
103 | case IORESOURCE_MEM: | ||
104 | len += scnprintf(buf + len, sizeof(buf) - len, | ||
105 | "%#llx-%#llx flags %#lx", | ||
106 | (unsigned long long) res->start, | ||
107 | (unsigned long long) res->end, | ||
108 | res->flags); | ||
109 | break; | ||
110 | case IORESOURCE_IRQ: | ||
111 | case IORESOURCE_DMA: | ||
112 | len += scnprintf(buf + len, sizeof(buf) - len, | ||
113 | "%lld flags %#lx", | ||
114 | (unsigned long long) res->start, | ||
115 | res->flags); | ||
116 | break; | ||
117 | } | ||
118 | pnp_dbg(&dev->dev, "%s\n", buf); | ||
119 | } | 86 | } |
120 | } | 87 | } |
121 | 88 | ||