From: makarand.karvekar Date: Mon, 2 Aug 2010 19:20:15 +0000 (-0500) Subject: misc: max9635: disable irq in suspend. X-Git-Tag: firefly_0821_release~9834^2~730 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=53cdf410a6f1f9558dce387f05f4d626c8b825e5;p=firefly-linux-kernel-4.4.55.git misc: max9635: disable irq in suspend. 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 --- diff --git a/drivers/misc/max9635.c b/drivers/misc/max9635.c index c582f5794836..1827a0378ef6 100644 --- a/drivers/misc/max9635.c +++ b/drivers/misc/max9635.c @@ -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) diff --git a/include/linux/max9635.h b/include/linux/max9635.h index f49bfc42eb49..be23a2cef7ee 100644 --- a/include/linux/max9635.h +++ b/include/linux/max9635.h @@ -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__