ARM: imx: Provide correct number of resources when registering gpio devices
[linux-2.6-microblaze.git] / arch / arm / mach-imx / devices / platform-gpio-mxc.c
index 78628ef..355de84 100644 (file)
@@ -24,7 +24,8 @@ struct platform_device *__init mxc_register_gpio(char *name, int id,
                        .flags = IORESOURCE_IRQ,
                },
        };
+       unsigned int nres;
 
-       return platform_device_register_resndata(&mxc_aips_bus,
-                       name, id, res, ARRAY_SIZE(res), NULL, 0);
+       nres = irq_high ? ARRAY_SIZE(res) : ARRAY_SIZE(res) - 1;
+       return platform_device_register_resndata(&mxc_aips_bus, name, id, res, nres, NULL, 0);
 }