misc: max9635: disable irq in suspend.
authormakarand.karvekar <makarand.karvekar@motorola.com>
Mon, 2 Aug 2010 19:20:15 +0000 (14:20 -0500)
committerColin Cross <ccross@android.com>
Wed, 6 Oct 2010 23:33:29 +0000 (16:33 -0700)
The device expects the irq to be disabled on resume, enable
it from suspend so enable/disables are balanced.

Change-Id: I62cf633819d8fdb3c5f7c6227f2625cfdecdc6a8
Signed-off-by: makarand.karvekar <makarand.karvekar@motorola.com>
drivers/misc/max9635.c
include/linux/max9635.h

index c582f57948365c8f726d097aaae4b95a3a1cee86..1827a0378ef6b620d1e11c8578b6a4a10f677824 100644 (file)
@@ -376,7 +376,7 @@ static const struct file_operations max9635_misc_fops = {
 
 static struct miscdevice max9635_misc_device = {
        .minor = MISC_DYNAMIC_MINOR,
-       .name = FOPS_MAX9635_NAME,
+       .name = MAX9635_NAME,
        .fops = &max9635_misc_fops,
 };
 #ifdef DEBUG
@@ -531,7 +531,7 @@ static int max9635_probe(struct i2c_client *client,
                goto error_input_allocate_failed;
        }
 
-       als_data->idev->name = "als";
+       als_data->idev->name = "max9635_als";
        input_set_capability(als_data->idev, EV_MSC, MSC_RAW);
        input_set_capability(als_data->idev, EV_LED, LED_MISC);
 
@@ -629,6 +629,7 @@ static int max9635_suspend(struct i2c_client *client, pm_message_t mesg)
        if (max9635_debug)
                pr_info("%s: Suspending\n", __func__);
 
+       disable_irq_nosync(als_data->client->irq);
        cancel_delayed_work_sync(&als_data->working_queue);
 
        if (atomic_read(&als_data->enabled) == 1)
index f49bfc42eb499e3e9d6f581fe5f8b46c7ac69286..be23a2cef7ee57515e151be0902ed06a5bae2b01 100644 (file)
@@ -19,9 +19,7 @@
 #ifndef _LINUX_MAX9635_H__
 #define _LINUX_MAX9635_H__
 
-#define MAX9635_NAME "MAX9635_als"
-#define FOPS_MAX9635_NAME "MAX9635"
-
+#define MAX9635_NAME "max9635"
 
 #ifdef __KERNEL__