]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/gpio/pca953x.c
Merge branch 'linus' into core/urgent
[linux-2.6-omap-h63xx.git] / drivers / gpio / pca953x.c
index a380730b61abe49800af8e655eaf5735d0524ad0..9ceeb89f1325ea776bf47c1e89fbcb5b81b8eeec 100644 (file)
@@ -188,6 +188,7 @@ static void pca953x_setup_gpio(struct pca953x_chip *chip, int gpios)
        gc->base = chip->gpio_start;
        gc->ngpio = gpios;
        gc->label = chip->client->name;
+       gc->dev = &chip->client->dev;
        gc->owner = THIS_MODULE;
 }
 
@@ -288,7 +289,10 @@ static int __init pca953x_init(void)
 {
        return i2c_add_driver(&pca953x_driver);
 }
-module_init(pca953x_init);
+/* register after i2c postcore initcall and before
+ * subsys initcalls that may rely on these GPIOs
+ */
+subsys_initcall(pca953x_init);
 
 static void __exit pca953x_exit(void)
 {