diff options
Diffstat (limited to 'drivers/pnp/manager.c')
-rw-r--r-- | drivers/pnp/manager.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/pnp/manager.c b/drivers/pnp/manager.c index be21dec539d9..08865292fc95 100644 --- a/drivers/pnp/manager.c +++ b/drivers/pnp/manager.c | |||
@@ -51,7 +51,7 @@ static int pnp_assign_port(struct pnp_dev *dev, struct pnp_port *rule, int idx) | |||
51 | res->end = res->start + rule->size - 1; | 51 | res->end = res->start + rule->size - 1; |
52 | 52 | ||
53 | /* run through until pnp_check_port is happy */ | 53 | /* run through until pnp_check_port is happy */ |
54 | while (!pnp_check_port(dev, idx)) { | 54 | while (!pnp_check_port(dev, res)) { |
55 | res->start += rule->align; | 55 | res->start += rule->align; |
56 | res->end = res->start + rule->size - 1; | 56 | res->end = res->start + rule->size - 1; |
57 | if (res->start > rule->max || !rule->align) { | 57 | if (res->start > rule->max || !rule->align) { |
@@ -108,7 +108,7 @@ static int pnp_assign_mem(struct pnp_dev *dev, struct pnp_mem *rule, int idx) | |||
108 | res->end = res->start + rule->size - 1; | 108 | res->end = res->start + rule->size - 1; |
109 | 109 | ||
110 | /* run through until pnp_check_mem is happy */ | 110 | /* run through until pnp_check_mem is happy */ |
111 | while (!pnp_check_mem(dev, idx)) { | 111 | while (!pnp_check_mem(dev, res)) { |
112 | res->start += rule->align; | 112 | res->start += rule->align; |
113 | res->end = res->start + rule->size - 1; | 113 | res->end = res->start + rule->size - 1; |
114 | if (res->start > rule->max || !rule->align) { | 114 | if (res->start > rule->max || !rule->align) { |
@@ -167,7 +167,7 @@ static int pnp_assign_irq(struct pnp_dev *dev, struct pnp_irq *rule, int idx) | |||
167 | for (i = 0; i < 16; i++) { | 167 | for (i = 0; i < 16; i++) { |
168 | if (test_bit(xtab[i], rule->map)) { | 168 | if (test_bit(xtab[i], rule->map)) { |
169 | res->start = res->end = xtab[i]; | 169 | res->start = res->end = xtab[i]; |
170 | if (pnp_check_irq(dev, idx)) { | 170 | if (pnp_check_irq(dev, res)) { |
171 | dev_dbg(&dev->dev, " assign irq %d %d\n", idx, | 171 | dev_dbg(&dev->dev, " assign irq %d %d\n", idx, |
172 | (int) res->start); | 172 | (int) res->start); |
173 | return 1; | 173 | return 1; |
@@ -209,7 +209,7 @@ static void pnp_assign_dma(struct pnp_dev *dev, struct pnp_dma *rule, int idx) | |||
209 | for (i = 0; i < 8; i++) { | 209 | for (i = 0; i < 8; i++) { |
210 | if (rule->map & (1 << xtab[i])) { | 210 | if (rule->map & (1 << xtab[i])) { |
211 | res->start = res->end = xtab[i]; | 211 | res->start = res->end = xtab[i]; |
212 | if (pnp_check_dma(dev, idx)) { | 212 | if (pnp_check_dma(dev, res)) { |
213 | dev_dbg(&dev->dev, " assign dma %d %d\n", idx, | 213 | dev_dbg(&dev->dev, " assign dma %d %d\n", idx, |
214 | (int) res->start); | 214 | (int) res->start); |
215 | return; | 215 | return; |