]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/input/keyboard/omap-keypad.c
[ARM] omap: fix a load of "warning: symbol 'xxx' was not declared. Should it be static?"
[linux-2.6-omap-h63xx.git] / drivers / input / keyboard / omap-keypad.c
index babc913d5492b617b388ee3eb7781ce0facd535e..039787f81ed88e40ef3b8358445abb8ce8619e54 100644 (file)
 #include <linux/platform_device.h>
 #include <linux/mutex.h>
 #include <linux/errno.h>
-#include <asm/arch/gpio.h>
-#include <asm/arch/keypad.h>
-#include <asm/arch/menelaus.h>
+#include <mach/gpio.h>
+#include <mach/keypad.h>
+#include <mach/menelaus.h>
 #include <asm/irq.h>
-#include <asm/hardware.h>
+#include <mach/hardware.h>
 #include <asm/io.h>
-#include <asm/mach-types.h>
-#include <asm/arch/mux.h>
+#include <mach/mux.h>
 
 #undef NEW_BOARD_LEARNING_MODE
 
@@ -63,7 +62,7 @@ struct omap_kp {
        unsigned int debounce;
 };
 
-DECLARE_TASKLET_DISABLED(kp_tasklet, omap_kp_tasklet, 0);
+static DECLARE_TASKLET_DISABLED(kp_tasklet, omap_kp_tasklet, 0);
 
 static int *keymap;
 static unsigned int *row_gpios;
@@ -352,6 +351,9 @@ static int __init omap_kp_probe(struct platform_device *pdev)
                        }
                        omap_set_gpio_direction(row_gpios[row_idx], 1);
                }
+       } else {
+               col_idx = 0;
+               row_idx = 0;
        }
 
        setup_timer(&omap_kp->timer, omap_kp_timer, (unsigned long)omap_kp);
@@ -415,10 +417,10 @@ err4:
 err3:
        device_remove_file(&pdev->dev, &dev_attr_enable);
 err2:
-       for (i = row_idx-1; i >=0; i--)
+       for (i = row_idx - 1; i >=0; i--)
                omap_free_gpio(row_gpios[i]);
 err1:
-       for (i = col_idx-1; i >=0; i--)
+       for (i = col_idx - 1; i >=0; i--)
                omap_free_gpio(col_gpios[i]);
 
        kfree(omap_kp);
@@ -464,6 +466,7 @@ static struct platform_driver omap_kp_driver = {
        .resume         = omap_kp_resume,
        .driver         = {
                .name   = "omap-keypad",
+               .owner  = THIS_MODULE,
        },
 };
 
@@ -484,3 +487,4 @@ module_exit(omap_kp_exit);
 MODULE_AUTHOR("Timo Teräs");
 MODULE_DESCRIPTION("OMAP Keypad Driver");
 MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:omap-keypad");