diff options
-rw-r--r-- | drivers/pnp/base.h | 1 | ||||
-rw-r--r-- | drivers/pnp/resource.c | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/drivers/pnp/base.h b/drivers/pnp/base.h index 6f60097c4212..4c2a62564994 100644 --- a/drivers/pnp/base.h +++ b/drivers/pnp/base.h | |||
@@ -46,6 +46,7 @@ int pnp_check_dma(struct pnp_dev *dev, struct resource *res); | |||
46 | void dbg_pnp_show_resources(struct pnp_dev *dev, char *desc); | 46 | void dbg_pnp_show_resources(struct pnp_dev *dev, char *desc); |
47 | 47 | ||
48 | void pnp_init_resource(struct resource *res); | 48 | void pnp_init_resource(struct resource *res); |
49 | int pnp_resource_type(struct resource *res); | ||
49 | 50 | ||
50 | struct pnp_resource *pnp_get_pnp_resource(struct pnp_dev *dev, | 51 | struct pnp_resource *pnp_get_pnp_resource(struct pnp_dev *dev, |
51 | unsigned int type, unsigned int num); | 52 | unsigned int type, unsigned int num); |
diff --git a/drivers/pnp/resource.c b/drivers/pnp/resource.c index 390b50096e30..cce341f743d4 100644 --- a/drivers/pnp/resource.c +++ b/drivers/pnp/resource.c | |||
@@ -499,6 +499,12 @@ int pnp_check_dma(struct pnp_dev *dev, struct resource *res) | |||
499 | #endif | 499 | #endif |
500 | } | 500 | } |
501 | 501 | ||
502 | int pnp_resource_type(struct resource *res) | ||
503 | { | ||
504 | return res->flags & (IORESOURCE_IO | IORESOURCE_MEM | | ||
505 | IORESOURCE_IRQ | IORESOURCE_DMA); | ||
506 | } | ||
507 | |||
502 | struct pnp_resource *pnp_get_pnp_resource(struct pnp_dev *dev, | 508 | struct pnp_resource *pnp_get_pnp_resource(struct pnp_dev *dev, |
503 | unsigned int type, unsigned int num) | 509 | unsigned int type, unsigned int num) |
504 | { | 510 | { |