]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/powerpc/sysdev/fsl_msi.c
Merge tag 'stable/for-linus-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git...
[karo-tx-linux.git] / arch / powerpc / sysdev / fsl_msi.c
index ecb5c1946d22cd01e05db0ef9369431869ec2ee6..6e097de00e093741890b12c45cb13b16d99d1d20 100644 (file)
@@ -60,7 +60,7 @@ static struct irq_chip fsl_msi_chip = {
        .name           = "FSL-MSI",
 };
 
-static int fsl_msi_host_map(struct irq_host *h, unsigned int virq,
+static int fsl_msi_host_map(struct irq_domain *h, unsigned int virq,
                                irq_hw_number_t hw)
 {
        struct fsl_msi *msi_data = h->host_data;
@@ -74,7 +74,7 @@ static int fsl_msi_host_map(struct irq_host *h, unsigned int virq,
        return 0;
 }
 
-static struct irq_host_ops fsl_msi_host_ops = {
+static const struct irq_domain_ops fsl_msi_host_ops = {
        .map = fsl_msi_host_map,
 };
 
@@ -387,8 +387,8 @@ static int __devinit fsl_of_msi_probe(struct platform_device *dev)
        }
        platform_set_drvdata(dev, msi);
 
-       msi->irqhost = irq_alloc_host(dev->dev.of_node, IRQ_HOST_MAP_LINEAR,
-                                     NR_MSI_IRQS, &fsl_msi_host_ops, 0);
+       msi->irqhost = irq_domain_add_linear(dev->dev.of_node,
+                                     NR_MSI_IRQS, &fsl_msi_host_ops, msi);
 
        if (msi->irqhost == NULL) {
                dev_err(&dev->dev, "No memory for MSI irqhost\n");
@@ -410,6 +410,7 @@ static int __devinit fsl_of_msi_probe(struct platform_device *dev)
 
                msi->msi_regs = ioremap(res.start, resource_size(&res));
                if (!msi->msi_regs) {
+                       err = -ENOMEM;
                        dev_err(&dev->dev, "could not map node %s\n",
                                dev->dev.of_node->full_name);
                        goto error_out;
@@ -420,8 +421,6 @@ static int __devinit fsl_of_msi_probe(struct platform_device *dev)
 
        msi->feature = features->fsl_pic_ip;
 
-       msi->irqhost->host_data = msi;
-
        /*
         * Remember the phandle, so that we can match with any PCI nodes
         * that have an "fsl,msi" property.