]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/gpio/gpio-mxs.c
Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[karo-tx-linux.git] / drivers / gpio / gpio-mxs.c
index 2292742eac8f5441642469f8fa05e04ca0979afb..6ae583f36733a1d94efeb2ee846f0d436d9487fd 100644 (file)
@@ -328,7 +328,7 @@ static int mxs_gpio_probe(struct platform_device *pdev)
        /* clear address has to be used to clear IRQSTAT bits */
        writel(~0U, port->base + PINCTRL_IRQSTAT(port) + MXS_CLR);
 
-       irq_base = irq_alloc_descs(-1, 0, 32, numa_node_id());
+       irq_base = devm_irq_alloc_descs(&pdev->dev, -1, 0, 32, numa_node_id());
        if (irq_base < 0) {
                err = irq_base;
                goto out_iounmap;
@@ -338,7 +338,7 @@ static int mxs_gpio_probe(struct platform_device *pdev)
                                             &irq_domain_simple_ops, NULL);
        if (!port->domain) {
                err = -ENODEV;
-               goto out_irqdesc_free;
+               goto out_iounmap;
        }
 
        /* gpio-mxs can be a generic irq chip */
@@ -370,8 +370,6 @@ static int mxs_gpio_probe(struct platform_device *pdev)
 
 out_irqdomain_remove:
        irq_domain_remove(port->domain);
-out_irqdesc_free:
-       irq_free_descs(irq_base, 32);
 out_iounmap:
        iounmap(port->base);
        return err;