From 02651df2b4c62f51a5e8e0021b791cdcf35708e5 Mon Sep 17 00:00:00 2001 From: flar2 Date: Sat, 17 Aug 2013 01:46:32 -0400 Subject: [PATCH] enable/disable the lid sensor Signed-off-by: flar2 --- drivers/input/lid.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/input/lid.c b/drivers/input/lid.c index 7f04a113e08a..f22f48ce45ab 100644 --- a/drivers/input/lid.c +++ b/drivers/input/lid.c @@ -93,11 +93,14 @@ static ssize_t show_lid_status(struct device *class, static irqreturn_t lid_interrupt_handler(int irq, void *dev_id) { - if (irq == hall_sensor_irq) { - LID_NOTICE("LID interrupt handler...gpio: %d..\n", - gpio_get_value(hall_sensor_gpio)); - queue_delayed_work(lid_wq, &lid_hall_sensor_work, 0); + if (enable_lid) { + if (irq == hall_sensor_irq) { + LID_NOTICE("LID interrupt handler...gpio: %d..\n", + gpio_get_value(hall_sensor_gpio)); + queue_delayed_work(lid_wq, &lid_hall_sensor_work, 0); + } } + return IRQ_HANDLED; }