irq_domain/powerpc: Use common irq_domain structure instead of irq_host
This patch drops the powerpc-specific irq_host structures and uses the common irq_domain strucutres defined in linux/irqdomain.h. It also fixes all the users to use the new structure names. Renaming irq_host to irq_domain has been discussed for a long time, and this patch is a step in the process of generalizing the powerpc virq code to be usable by all architecture. An astute reader will notice that this patch actually removes the irq_host structure instead of renaming it. This is because the irq_domain structure already exists in include/linux/irqdomain.h and has the needed data members. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Milton Miller <miltonm@bga.com> Tested-by: Olof Johansson <olof@lixom.net>
This commit is contained in:
@@ -29,7 +29,7 @@ static DEFINE_RAW_SPINLOCK(pci_pic_lock);
|
||||
|
||||
struct pq2ads_pci_pic {
|
||||
struct device_node *node;
|
||||
struct irq_host *host;
|
||||
struct irq_domain *host;
|
||||
|
||||
struct {
|
||||
u32 stat;
|
||||
@@ -103,7 +103,7 @@ static void pq2ads_pci_irq_demux(unsigned int irq, struct irq_desc *desc)
|
||||
}
|
||||
}
|
||||
|
||||
static int pci_pic_host_map(struct irq_host *h, unsigned int virq,
|
||||
static int pci_pic_host_map(struct irq_domain *h, unsigned int virq,
|
||||
irq_hw_number_t hw)
|
||||
{
|
||||
irq_set_status_flags(virq, IRQ_LEVEL);
|
||||
@@ -112,14 +112,14 @@ static int pci_pic_host_map(struct irq_host *h, unsigned int virq,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct irq_host_ops pci_pic_host_ops = {
|
||||
static struct irq_domain_ops pci_pic_host_ops = {
|
||||
.map = pci_pic_host_map,
|
||||
};
|
||||
|
||||
int __init pq2ads_pci_init_irq(void)
|
||||
{
|
||||
struct pq2ads_pci_pic *priv;
|
||||
struct irq_host *host;
|
||||
struct irq_domain *host;
|
||||
struct device_node *np;
|
||||
int ret = -ENODEV;
|
||||
int irq;
|
||||
@@ -156,7 +156,7 @@ int __init pq2ads_pci_init_irq(void)
|
||||
out_be32(&priv->regs->mask, ~0);
|
||||
mb();
|
||||
|
||||
host = irq_alloc_host(np, IRQ_HOST_MAP_LINEAR, NUM_IRQS,
|
||||
host = irq_alloc_host(np, IRQ_DOMAIN_MAP_LINEAR, NUM_IRQS,
|
||||
&pci_pic_host_ops, NUM_IRQS);
|
||||
if (!host) {
|
||||
ret = -ENOMEM;
|
||||
|
Reference in New Issue
Block a user