]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/input/keyboard/omap-keypad.c
Merge branch 'for-linus-merged' of master.kernel.org:/home/rmk/linux-2.6-arm
[linux-2.6-omap-h63xx.git] / drivers / input / keyboard / omap-keypad.c
index 76f1969552c5e453c93a3db263e1d7d834c66061..dcea87a0bc5674e16b88502273b903d684800663 100644 (file)
@@ -4,7 +4,7 @@
  * OMAP Keypad Driver
  *
  * Copyright (C) 2003 Nokia Corporation
- * Written by Timo Teräs <ext-timo.teras@nokia.com>
+ * Written by Timo Teräs <ext-timo.teras@nokia.com>
  *
  * Added support for H2 & H3 Keypad
  * Copyright (C) 2004 Texas Instruments
 #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
 
@@ -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,
        },
 };
 
@@ -481,6 +484,7 @@ static void __exit omap_kp_exit(void)
 module_init(omap_kp_init);
 module_exit(omap_kp_exit);
 
-MODULE_AUTHOR("Timo Teräs");
+MODULE_AUTHOR("Timo Teräs");
 MODULE_DESCRIPTION("OMAP Keypad Driver");
 MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:omap-keypad");