From b813d9868a47ae73bc634b94adac62913f42be51 Mon Sep 17 00:00:00 2001 From: maxwen Date: Sun, 16 Jun 2013 02:35:26 +0200 Subject: [PATCH] enrc2b: remove the HS irq derp --- arch/arm/mach-tegra/htc_headset_gpio.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/arch/arm/mach-tegra/htc_headset_gpio.c b/arch/arm/mach-tegra/htc_headset_gpio.c index cc26da2b..45fe4442 100644 --- a/arch/arm/mach-tegra/htc_headset_gpio.c +++ b/arch/arm/mach-tegra/htc_headset_gpio.c @@ -54,7 +54,6 @@ unsigned long unstable_jiffies = 0.02 * HZ; unsigned long irq_delay = 0.010 * HZ; static int headset_uart_enable = 0; -static bool key_irq_enabled = false; /* * This function should be called while caller thread holding a @@ -134,12 +133,8 @@ static void button_gpio_work_func(struct work_struct *work) static void hs_key_irq_enable_func(struct work_struct *work) { - if (key_irq_enabled) - return; - HS_DBG(); enable_irq(hi->key_irq); - key_irq_enabled = true; } static void cancel_button_work_func(struct work_struct *work) @@ -173,7 +168,6 @@ static irqreturn_t button_irq_handler(int irq, void *dev_id) HS_DBG(); disable_irq_nosync(hi->key_irq); - key_irq_enabled = false; hi->key_irq_type ^= irq_mask; irq_set_irq_type(hi->key_irq, hi->key_irq_type); @@ -342,7 +336,6 @@ static void detect_gpio_work_func(struct work_struct *work) if (ret < 0) HS_ERR("request irq error;"); disable_irq_nosync(hi->key_irq); - key_irq_enabled = false; } if (hi->key_irq){ @@ -351,13 +344,11 @@ static void detect_gpio_work_func(struct work_struct *work) if (ret < 0) HS_ERR("set irq wake error"); enable_irq(hi->key_irq); - key_irq_enabled = true; }else{ ret = irq_set_irq_wake(hi->key_irq, 0); if (ret < 0) HS_ERR("set irq wake error"); disable_irq_nosync(hi->key_irq); - key_irq_enabled = false; } } } @@ -366,15 +357,11 @@ static void detect_gpio_work_func(struct work_struct *work) static int hs_gpio_key_int_enable(int enable) { if (enable) { - if (!key_irq_enabled){ - HS_LOG("Key int enable"); - enable_irq(hi->key_irq); - key_irq_enabled = true; - } + HS_LOG("Key int enable"); + enable_irq(hi->key_irq); } else { HS_LOG("Key int disable"); disable_irq_nosync(hi->key_irq); - key_irq_enabled = false; } return 0; }