Merge tag 'gpio-v4.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux...
[cascardo/linux.git] / drivers / gpio / gpio-mxc.c
index e35af52..c1a1e00 100644 (file)
@@ -458,6 +458,11 @@ static int mxc_gpio_probe(struct platform_device *pdev)
        if (err)
                goto out_bgio;
 
+       if (of_property_read_bool(np, "gpio-ranges")) {
+               port->gc.request = gpiochip_generic_request;
+               port->gc.free = gpiochip_generic_free;
+       }
+
        port->gc.to_irq = mxc_gpio_to_irq;
        port->gc.base = (pdev->id < 0) ? of_alias_get_id(np, "gpio") * 32 :
                                             pdev->id * 32;
@@ -510,4 +515,4 @@ static int __init gpio_mxc_init(void)
 {
        return platform_driver_register(&mxc_gpio_driver);
 }
-postcore_initcall(gpio_mxc_init);
+subsys_initcall(gpio_mxc_init);