diff options
Diffstat (limited to 'drivers/pnp/resource.c')
-rw-r--r-- | drivers/pnp/resource.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/pnp/resource.c b/drivers/pnp/resource.c index b0ecacbe53b1..3e6db1c1dc29 100644 --- a/drivers/pnp/resource.c +++ b/drivers/pnp/resource.c | |||
@@ -503,6 +503,22 @@ static struct pnp_resource *pnp_new_resource(struct pnp_dev *dev) | |||
503 | return pnp_res; | 503 | return pnp_res; |
504 | } | 504 | } |
505 | 505 | ||
506 | struct pnp_resource *pnp_add_resource(struct pnp_dev *dev, | ||
507 | struct resource *res) | ||
508 | { | ||
509 | struct pnp_resource *pnp_res; | ||
510 | |||
511 | pnp_res = pnp_new_resource(dev); | ||
512 | if (!pnp_res) { | ||
513 | dev_err(&dev->dev, "can't add resource %pR\n", res); | ||
514 | return NULL; | ||
515 | } | ||
516 | |||
517 | pnp_res->res = *res; | ||
518 | dev_dbg(&dev->dev, "%pR\n", res); | ||
519 | return pnp_res; | ||
520 | } | ||
521 | |||
506 | struct pnp_resource *pnp_add_irq_resource(struct pnp_dev *dev, int irq, | 522 | struct pnp_resource *pnp_add_irq_resource(struct pnp_dev *dev, int irq, |
507 | int flags) | 523 | int flags) |
508 | { | 524 | { |