summaryrefslogtreecommitdiffstats
path: root/drivers/pnp/base.h
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2008-06-27 16:57:11 -0600
committerAndi Kleen <andi@basil.nowhere.org>2008-07-16 23:27:07 +0200
commitc227536b4cc2600fc9d22ba0067f699165f6621f (patch)
treeeacf9e90f89f9f71304033e4da1492450c8c644a /drivers/pnp/base.h
parentb08395e5038e3337bb85c7246a635a3be6d5a29c (diff)
downloadop-kernel-dev-c227536b4cc2600fc9d22ba0067f699165f6621f.zip
op-kernel-dev-c227536b4cc2600fc9d22ba0067f699165f6621f.tar.gz
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 afbeee5..360c638 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);
struct pnp_option *pnp_register_dependent_option(struct pnp_dev *dev,
int priority);
int pnp_register_irq_resource(struct pnp_dev *dev, struct pnp_option *option,
- struct pnp_irq *data);
+ pnp_irq_mask_t *map, unsigned char flags);
int pnp_register_dma_resource(struct pnp_dev *dev, struct pnp_option *option,
- struct pnp_dma *data);
+ unsigned char map, unsigned char flags);
int pnp_register_port_resource(struct pnp_dev *dev, struct pnp_option *option,
- struct pnp_port *data);
+ resource_size_t min, resource_size_t max,
+ resource_size_t align, resource_size_t size,
+ unsigned char flags);
int pnp_register_mem_resource(struct pnp_dev *dev, struct pnp_option *option,
- struct pnp_mem *data);
+ resource_size_t min, resource_size_t max,
+ resource_size_t align, resource_size_t size,
+ unsigned char flags);
void pnp_init_resources(struct pnp_dev *dev);
void pnp_fixup_device(struct pnp_dev *dev);
OpenPOWER on IntegriCloud