diff options
Diffstat (limited to 'drivers/pnp/interface.c')
| -rw-r--r-- | drivers/pnp/interface.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/pnp/interface.c b/drivers/pnp/interface.c index ead151242a64..e8134c286207 100644 --- a/drivers/pnp/interface.c +++ b/drivers/pnp/interface.c | |||
| @@ -324,6 +324,7 @@ pnp_set_current_resources(struct device *dmdev, struct device_attribute *attr, | |||
| 324 | struct resource *res; | 324 | struct resource *res; |
| 325 | char *buf = (void *)ubuf; | 325 | char *buf = (void *)ubuf; |
| 326 | int retval = 0; | 326 | int retval = 0; |
| 327 | resource_size_t start; | ||
| 327 | 328 | ||
| 328 | if (dev->status & PNP_ATTACHED) { | 329 | if (dev->status & PNP_ATTACHED) { |
| 329 | retval = -EBUSY; | 330 | retval = -EBUSY; |
| @@ -429,16 +430,10 @@ pnp_set_current_resources(struct device *dmdev, struct device_attribute *attr, | |||
| 429 | buf += 3; | 430 | buf += 3; |
| 430 | while (isspace(*buf)) | 431 | while (isspace(*buf)) |
| 431 | ++buf; | 432 | ++buf; |
| 432 | pnp_res = pnp_get_pnp_resource(dev, | 433 | start = simple_strtoul(buf, &buf, 0); |
| 433 | IORESOURCE_IRQ, nirq); | 434 | pnp_res = pnp_add_irq_resource(dev, start, 0); |
| 434 | if (!pnp_res) | 435 | if (pnp_res) |
| 435 | break; | 436 | nirq++; |
| 436 | pnp_res->index = nirq; | ||
| 437 | res = &pnp_res->res; | ||
| 438 | res->start = res->end = | ||
| 439 | simple_strtoul(buf, &buf, 0); | ||
| 440 | res->flags = IORESOURCE_IRQ; | ||
| 441 | nirq++; | ||
| 442 | continue; | 437 | continue; |
| 443 | } | 438 | } |
| 444 | if (!strnicmp(buf, "dma", 3)) { | 439 | if (!strnicmp(buf, "dma", 3)) { |
