Given a struct resource, this returns the type (IO, MEM, IRQ, DMA). Signed-off-by: Bjorn Helgaas <bjorn.helgaas@xxxxxx> Index: work8/drivers/pnp/base.h =================================================================== --- work8.orig/drivers/pnp/base.h 2008-04-17 14:07:25.000000000 -0600 +++ work8/drivers/pnp/base.h 2008-04-17 14:07:37.000000000 -0600 @@ -18,6 +18,7 @@ int pnp_check_dma(struct pnp_dev * dev, int idx); void pnp_init_resource(struct resource *res); +int pnp_resource_type(struct resource *res); #define PNP_MAX_PORT 40 #define PNP_MAX_MEM 24 Index: work8/drivers/pnp/resource.c =================================================================== --- work8.orig/drivers/pnp/resource.c 2008-04-17 14:07:48.000000000 -0600 +++ work8/drivers/pnp/resource.c 2008-04-17 14:09:25.000000000 -0600 @@ -489,6 +489,12 @@ #endif } +int pnp_resource_type(struct resource *res) +{ + return res->flags & (IORESOURCE_IO | IORESOURCE_MEM | + IORESOURCE_IRQ | IORESOURCE_DMA); +} + struct resource *pnp_get_resource(struct pnp_dev *dev, unsigned int type, unsigned int num) { -- -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html