aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pnp/base.h
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2008-06-27 18:57:11 -0400
committerAndi Kleen <andi@basil.nowhere.org>2008-07-16 17:27:07 -0400
commitc227536b4cc2600fc9d22ba0067f699165f6621f (patch)
treeeacf9e90f89f9f71304033e4da1492450c8c644a /drivers/pnp/base.h
parentb08395e5038e3337bb85c7246a635a3be6d5a29c (diff)
PNP: centralize resource option allocations
This patch moves all the option allocations (pnp_mem, pnp_port, etc) into the pnp_register_{mem,port,irq,dma}_resource() functions. This will make it easier to rework the option data structures. The non-trivial part of this patch is the IRQ handling. The backends have to allocate a local pnp_irq_mask_t bitmap, populate it, and pass a pointer to pnp_register_irq_resource(). Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Andi Kleen <ak@linux.intel.com> Acked-by: Rene Herman <rene.herman@gmail.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/pnp/base.h')
-rw-r--r--drivers/pnp/base.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/pnp/base.h b/drivers/pnp/base.h
index afbeee5b8af6..360c6385686c 100644
--- a/drivers/pnp/base.h
+++ b/drivers/pnp/base.h
@@ -74,13 +74,17 @@ struct pnp_option *pnp_register_independent_option(struct pnp_dev *dev);
74struct pnp_option *pnp_register_dependent_option(struct pnp_dev *dev, 74struct pnp_option *pnp_register_dependent_option(struct pnp_dev *dev,
75 int priority); 75 int priority);
76int pnp_register_irq_resource(struct pnp_dev *dev, struct pnp_option *option, 76int pnp_register_irq_resource(struct pnp_dev *dev, struct pnp_option *option,
77 struct pnp_irq *data); 77 pnp_irq_mask_t *map, unsigned char flags);
78int pnp_register_dma_resource(struct pnp_dev *dev, struct pnp_option *option, 78int pnp_register_dma_resource(struct pnp_dev *dev, struct pnp_option *option,
79 struct pnp_dma *data); 79 unsigned char map, unsigned char flags);
80int pnp_register_port_resource(struct pnp_dev *dev, struct pnp_option *option, 80int pnp_register_port_resource(struct pnp_dev *dev, struct pnp_option *option,
81 struct pnp_port *data); 81 resource_size_t min, resource_size_t max,
82 resource_size_t align, resource_size_t size,
83 unsigned char flags);
82int pnp_register_mem_resource(struct pnp_dev *dev, struct pnp_option *option, 84int pnp_register_mem_resource(struct pnp_dev *dev, struct pnp_option *option,
83 struct pnp_mem *data); 85 resource_size_t min, resource_size_t max,
86 resource_size_t align, resource_size_t size,
87 unsigned char flags);
84void pnp_init_resources(struct pnp_dev *dev); 88void pnp_init_resources(struct pnp_dev *dev);
85 89
86void pnp_fixup_device(struct pnp_dev *dev); 90void pnp_fixup_device(struct pnp_dev *dev);