aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pnp
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pnp')
-rw-r--r--drivers/pnp/base.h1
-rw-r--r--drivers/pnp/support.c15
2 files changed, 16 insertions, 0 deletions
diff --git a/drivers/pnp/base.h b/drivers/pnp/base.h
index 4c2a62564994..c91315826da2 100644
--- a/drivers/pnp/base.h
+++ b/drivers/pnp/base.h
@@ -43,6 +43,7 @@ int pnp_check_mem(struct pnp_dev *dev, struct resource *res);
43int pnp_check_irq(struct pnp_dev *dev, struct resource *res); 43int pnp_check_irq(struct pnp_dev *dev, struct resource *res);
44int pnp_check_dma(struct pnp_dev *dev, struct resource *res); 44int pnp_check_dma(struct pnp_dev *dev, struct resource *res);
45 45
46char *pnp_resource_type_name(struct resource *res);
46void dbg_pnp_show_resources(struct pnp_dev *dev, char *desc); 47void dbg_pnp_show_resources(struct pnp_dev *dev, char *desc);
47 48
48void pnp_init_resource(struct resource *res); 49void pnp_init_resource(struct resource *res);
diff --git a/drivers/pnp/support.c b/drivers/pnp/support.c
index 7f594ccf4958..eb07345f5cf7 100644
--- a/drivers/pnp/support.c
+++ b/drivers/pnp/support.c
@@ -52,6 +52,21 @@ void pnp_eisa_id_to_string(u32 id, char *str)
52 str[7] = '\0'; 52 str[7] = '\0';
53} 53}
54 54
55char *pnp_resource_type_name(struct resource *res)
56{
57 switch (pnp_resource_type(res)) {
58 case IORESOURCE_IO:
59 return "io";
60 case IORESOURCE_MEM:
61 return "mem";
62 case IORESOURCE_IRQ:
63 return "irq";
64 case IORESOURCE_DMA:
65 return "dma";
66 }
67 return NULL;
68}
69
55void dbg_pnp_show_resources(struct pnp_dev *dev, char *desc) 70void dbg_pnp_show_resources(struct pnp_dev *dev, char *desc)
56{ 71{
57#ifdef DEBUG 72#ifdef DEBUG