aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pnp/manager.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pnp/manager.c')
-rw-r--r--drivers/pnp/manager.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/pnp/manager.c b/drivers/pnp/manager.c
index b526eaad3f6c..00fd3577b985 100644
--- a/drivers/pnp/manager.c
+++ b/drivers/pnp/manager.c
@@ -25,7 +25,7 @@ static int pnp_assign_port(struct pnp_dev *dev, struct pnp_port *rule, int idx)
25 25
26 res = pnp_get_resource(dev, IORESOURCE_IO, idx); 26 res = pnp_get_resource(dev, IORESOURCE_IO, idx);
27 if (res) { 27 if (res) {
28 dev_dbg(&dev->dev, " io %d already set to %#llx-%#llx " 28 pnp_dbg(&dev->dev, " io %d already set to %#llx-%#llx "
29 "flags %#lx\n", idx, (unsigned long long) res->start, 29 "flags %#lx\n", idx, (unsigned long long) res->start,
30 (unsigned long long) res->end, res->flags); 30 (unsigned long long) res->end, res->flags);
31 return 0; 31 return 0;
@@ -38,7 +38,7 @@ static int pnp_assign_port(struct pnp_dev *dev, struct pnp_port *rule, int idx)
38 38
39 if (!rule->size) { 39 if (!rule->size) {
40 res->flags |= IORESOURCE_DISABLED; 40 res->flags |= IORESOURCE_DISABLED;
41 dev_dbg(&dev->dev, " io %d disabled\n", idx); 41 pnp_dbg(&dev->dev, " io %d disabled\n", idx);
42 goto __add; 42 goto __add;
43 } 43 }
44 44
@@ -49,7 +49,7 @@ static int pnp_assign_port(struct pnp_dev *dev, struct pnp_port *rule, int idx)
49 res->start += rule->align; 49 res->start += rule->align;
50 res->end = res->start + rule->size - 1; 50 res->end = res->start + rule->size - 1;
51 if (res->start > rule->max || !rule->align) { 51 if (res->start > rule->max || !rule->align) {
52 dev_dbg(&dev->dev, " couldn't assign io %d " 52 pnp_dbg(&dev->dev, " couldn't assign io %d "
53 "(min %#llx max %#llx)\n", idx, 53 "(min %#llx max %#llx)\n", idx,
54 (unsigned long long) rule->min, 54 (unsigned long long) rule->min,
55 (unsigned long long) rule->max); 55 (unsigned long long) rule->max);
@@ -68,7 +68,7 @@ static int pnp_assign_mem(struct pnp_dev *dev, struct pnp_mem *rule, int idx)
68 68
69 res = pnp_get_resource(dev, IORESOURCE_MEM, idx); 69 res = pnp_get_resource(dev, IORESOURCE_MEM, idx);
70 if (res) { 70 if (res) {
71 dev_dbg(&dev->dev, " mem %d already set to %#llx-%#llx " 71 pnp_dbg(&dev->dev, " mem %d already set to %#llx-%#llx "
72 "flags %#lx\n", idx, (unsigned long long) res->start, 72 "flags %#lx\n", idx, (unsigned long long) res->start,
73 (unsigned long long) res->end, res->flags); 73 (unsigned long long) res->end, res->flags);
74 return 0; 74 return 0;
@@ -90,7 +90,7 @@ static int pnp_assign_mem(struct pnp_dev *dev, struct pnp_mem *rule, int idx)
90 90
91 if (!rule->size) { 91 if (!rule->size) {
92 res->flags |= IORESOURCE_DISABLED; 92 res->flags |= IORESOURCE_DISABLED;
93 dev_dbg(&dev->dev, " mem %d disabled\n", idx); 93 pnp_dbg(&dev->dev, " mem %d disabled\n", idx);
94 goto __add; 94 goto __add;
95 } 95 }
96 96
@@ -101,7 +101,7 @@ static int pnp_assign_mem(struct pnp_dev *dev, struct pnp_mem *rule, int idx)
101 res->start += rule->align; 101 res->start += rule->align;
102 res->end = res->start + rule->size - 1; 102 res->end = res->start + rule->size - 1;
103 if (res->start > rule->max || !rule->align) { 103 if (res->start > rule->max || !rule->align) {
104 dev_dbg(&dev->dev, " couldn't assign mem %d " 104 pnp_dbg(&dev->dev, " couldn't assign mem %d "
105 "(min %#llx max %#llx)\n", idx, 105 "(min %#llx max %#llx)\n", idx,
106 (unsigned long long) rule->min, 106 (unsigned long long) rule->min,
107 (unsigned long long) rule->max); 107 (unsigned long long) rule->max);
@@ -126,7 +126,7 @@ static int pnp_assign_irq(struct pnp_dev *dev, struct pnp_irq *rule, int idx)
126 126
127 res = pnp_get_resource(dev, IORESOURCE_IRQ, idx); 127 res = pnp_get_resource(dev, IORESOURCE_IRQ, idx);
128 if (res) { 128 if (res) {
129 dev_dbg(&dev->dev, " irq %d already set to %d flags %#lx\n", 129 pnp_dbg(&dev->dev, " irq %d already set to %d flags %#lx\n",
130 idx, (int) res->start, res->flags); 130 idx, (int) res->start, res->flags);
131 return 0; 131 return 0;
132 } 132 }
@@ -138,7 +138,7 @@ static int pnp_assign_irq(struct pnp_dev *dev, struct pnp_irq *rule, int idx)
138 138
139 if (bitmap_empty(rule->map.bits, PNP_IRQ_NR)) { 139 if (bitmap_empty(rule->map.bits, PNP_IRQ_NR)) {
140 res->flags |= IORESOURCE_DISABLED; 140 res->flags |= IORESOURCE_DISABLED;
141 dev_dbg(&dev->dev, " irq %d disabled\n", idx); 141 pnp_dbg(&dev->dev, " irq %d disabled\n", idx);
142 goto __add; 142 goto __add;
143 } 143 }
144 144
@@ -160,11 +160,11 @@ static int pnp_assign_irq(struct pnp_dev *dev, struct pnp_irq *rule, int idx)
160 res->start = -1; 160 res->start = -1;
161 res->end = -1; 161 res->end = -1;
162 res->flags |= IORESOURCE_DISABLED; 162 res->flags |= IORESOURCE_DISABLED;
163 dev_dbg(&dev->dev, " irq %d disabled (optional)\n", idx); 163 pnp_dbg(&dev->dev, " irq %d disabled (optional)\n", idx);
164 goto __add; 164 goto __add;
165 } 165 }
166 166
167 dev_dbg(&dev->dev, " couldn't assign irq %d\n", idx); 167 pnp_dbg(&dev->dev, " couldn't assign irq %d\n", idx);
168 return -EBUSY; 168 return -EBUSY;
169 169
170__add: 170__add:
@@ -184,7 +184,7 @@ static int pnp_assign_dma(struct pnp_dev *dev, struct pnp_dma *rule, int idx)
184 184
185 res = pnp_get_resource(dev, IORESOURCE_DMA, idx); 185 res = pnp_get_resource(dev, IORESOURCE_DMA, idx);
186 if (res) { 186 if (res) {
187 dev_dbg(&dev->dev, " dma %d already set to %d flags %#lx\n", 187 pnp_dbg(&dev->dev, " dma %d already set to %d flags %#lx\n",
188 idx, (int) res->start, res->flags); 188 idx, (int) res->start, res->flags);
189 return 0; 189 return 0;
190 } 190 }
@@ -205,7 +205,7 @@ static int pnp_assign_dma(struct pnp_dev *dev, struct pnp_dma *rule, int idx)
205 res->start = res->end = MAX_DMA_CHANNELS; 205 res->start = res->end = MAX_DMA_CHANNELS;
206#endif 206#endif
207 res->flags |= IORESOURCE_DISABLED; 207 res->flags |= IORESOURCE_DISABLED;
208 dev_dbg(&dev->dev, " disable dma %d\n", idx); 208 pnp_dbg(&dev->dev, " disable dma %d\n", idx);
209 209
210__add: 210__add:
211 pnp_add_dma_resource(dev, res->start, res->flags); 211 pnp_add_dma_resource(dev, res->start, res->flags);
@@ -238,7 +238,7 @@ static int pnp_assign_resources(struct pnp_dev *dev, int set)
238 int nport = 0, nmem = 0, nirq = 0, ndma = 0; 238 int nport = 0, nmem = 0, nirq = 0, ndma = 0;
239 int ret = 0; 239 int ret = 0;
240 240
241 dev_dbg(&dev->dev, "pnp_assign_resources, try dependent set %d\n", set); 241 pnp_dbg(&dev->dev, "pnp_assign_resources, try dependent set %d\n", set);
242 mutex_lock(&pnp_res_mutex); 242 mutex_lock(&pnp_res_mutex);
243 pnp_clean_resource_table(dev); 243 pnp_clean_resource_table(dev);
244 244
@@ -270,7 +270,7 @@ static int pnp_assign_resources(struct pnp_dev *dev, int set)
270 270
271 mutex_unlock(&pnp_res_mutex); 271 mutex_unlock(&pnp_res_mutex);
272 if (ret < 0) { 272 if (ret < 0) {
273 dev_dbg(&dev->dev, "pnp_assign_resources failed (%d)\n", ret); 273 pnp_dbg(&dev->dev, "pnp_assign_resources failed (%d)\n", ret);
274 pnp_clean_resource_table(dev); 274 pnp_clean_resource_table(dev);
275 } else 275 } else
276 dbg_pnp_show_resources(dev, "pnp_assign_resources succeeded"); 276 dbg_pnp_show_resources(dev, "pnp_assign_resources succeeded");
@@ -286,7 +286,7 @@ int pnp_auto_config_dev(struct pnp_dev *dev)
286 int i, ret; 286 int i, ret;
287 287
288 if (!pnp_can_configure(dev)) { 288 if (!pnp_can_configure(dev)) {
289 dev_dbg(&dev->dev, "configuration not supported\n"); 289 pnp_dbg(&dev->dev, "configuration not supported\n");
290 return -ENODEV; 290 return -ENODEV;
291 } 291 }
292 292
@@ -313,7 +313,7 @@ int pnp_auto_config_dev(struct pnp_dev *dev)
313int pnp_start_dev(struct pnp_dev *dev) 313int pnp_start_dev(struct pnp_dev *dev)
314{ 314{
315 if (!pnp_can_write(dev)) { 315 if (!pnp_can_write(dev)) {
316 dev_dbg(&dev->dev, "activation not supported\n"); 316 pnp_dbg(&dev->dev, "activation not supported\n");
317 return -EINVAL; 317 return -EINVAL;
318 } 318 }
319 319
@@ -336,7 +336,7 @@ int pnp_start_dev(struct pnp_dev *dev)
336int pnp_stop_dev(struct pnp_dev *dev) 336int pnp_stop_dev(struct pnp_dev *dev)
337{ 337{
338 if (!pnp_can_disable(dev)) { 338 if (!pnp_can_disable(dev)) {
339 dev_dbg(&dev->dev, "disabling not supported\n"); 339 pnp_dbg(&dev->dev, "disabling not supported\n");
340 return -EINVAL; 340 return -EINVAL;
341 } 341 }
342 if (dev->protocol->disable(dev) < 0) { 342 if (dev->protocol->disable(dev) < 0) {