diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2008-06-27 18:57:11 -0400 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2008-07-16 17:27:07 -0400 |
commit | c227536b4cc2600fc9d22ba0067f699165f6621f (patch) | |
tree | eacf9e90f89f9f71304033e4da1492450c8c644a /drivers/pnp/base.h | |
parent | b08395e5038e3337bb85c7246a635a3be6d5a29c (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.h | 12 |
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); | |||
74 | struct pnp_option *pnp_register_dependent_option(struct pnp_dev *dev, | 74 | struct pnp_option *pnp_register_dependent_option(struct pnp_dev *dev, |
75 | int priority); | 75 | int priority); |
76 | int pnp_register_irq_resource(struct pnp_dev *dev, struct pnp_option *option, | 76 | int 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); |
78 | int pnp_register_dma_resource(struct pnp_dev *dev, struct pnp_option *option, | 78 | int pnp_register_dma_resource(struct pnp_dev *dev, struct pnp_option *option, |
79 | struct pnp_dma *data); | 79 | unsigned char map, unsigned char flags); |
80 | int pnp_register_port_resource(struct pnp_dev *dev, struct pnp_option *option, | 80 | int 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); | ||
82 | int pnp_register_mem_resource(struct pnp_dev *dev, struct pnp_option *option, | 84 | int 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); | ||
84 | void pnp_init_resources(struct pnp_dev *dev); | 88 | void pnp_init_resources(struct pnp_dev *dev); |
85 | 89 | ||
86 | void pnp_fixup_device(struct pnp_dev *dev); | 90 | void pnp_fixup_device(struct pnp_dev *dev); |