Commit 19f955b5 authored by Brian Swetland's avatar Brian Swetland Committed by Tony Lindgren

[PATCH] ARM: OMAP: fix omap keypad

- register an "omap-keypad" device so that the keypad
  driver actually gets probed
- initialize kp_tasklet.data so that we don't crash the
  first time the keypad tasklet runs
parent 2a6e47ad
...@@ -99,6 +99,11 @@ static inline void omap_init_i2c(void) {} ...@@ -99,6 +99,11 @@ static inline void omap_init_i2c(void) {}
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
#if defined(CONFIG_KEYBOARD_OMAP) || defined(CONFIG_KEYBOARD_OMAP_MODULE) #if defined(CONFIG_KEYBOARD_OMAP) || defined(CONFIG_KEYBOARD_OMAP_MODULE)
static struct platform_device omap_kp_device = {
.name = "omap-keypad",
.id = -1,
};
static void omap_init_kp(void) static void omap_init_kp(void)
{ {
if (machine_is_omap_h2() || machine_is_omap_h3()) { if (machine_is_omap_h2() || machine_is_omap_h3()) {
...@@ -127,6 +132,8 @@ static void omap_init_kp(void) ...@@ -127,6 +132,8 @@ static void omap_init_kp(void)
omap_cfg_reg(F4_730_KBC3); omap_cfg_reg(F4_730_KBC3);
omap_cfg_reg(E3_730_KBC4); omap_cfg_reg(E3_730_KBC4);
} }
(void) platform_device_register(&omap_kp_device);
} }
#else #else
static inline void omap_init_kp(void) {} static inline void omap_init_kp(void) {}
......
...@@ -331,6 +331,7 @@ static int __init omap_kp_probe(struct platform_device *pdev) ...@@ -331,6 +331,7 @@ static int __init omap_kp_probe(struct platform_device *pdev)
/* get the irq and init timer*/ /* get the irq and init timer*/
tasklet_enable(&kp_tasklet); tasklet_enable(&kp_tasklet);
kp_tasklet.data = (unsigned long) omap_kp;
if (request_irq(keypad_irq, omap_kp_interrupt, 0, if (request_irq(keypad_irq, omap_kp_interrupt, 0,
"omap-keypad", 0) < 0) "omap-keypad", 0) < 0)
return -EINVAL; return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment