From: Rebecca Schultz Zavin Date: Wed, 25 Aug 2010 20:55:03 +0000 (-0700) Subject: misc: max9635: Remove early suspend/resume handlers X-Git-Tag: firefly_0821_release~9834^2~643 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=27b8647606152840155f40dae7f9b18077b0a9a3;p=firefly-linux-kernel-4.4.55.git misc: max9635: Remove early suspend/resume handlers Allow userspace to set policy on sensor enable/disable Change-Id: I901edeaf6ab3bddb79220c4ba7248b8873e6338e Signed-off-by: Rebecca Schultz Zavin --- diff --git a/drivers/misc/max9635.c b/drivers/misc/max9635.c index 1827a0378ef6..c58f4f02f622 100644 --- a/drivers/misc/max9635.c +++ b/drivers/misc/max9635.c @@ -17,7 +17,6 @@ */ #include -#include #include #include #include @@ -58,7 +57,6 @@ struct max9635_data { struct i2c_client *client; struct delayed_work working_queue; struct max9635_platform_data *als_pdata; - struct early_suspend early_suspend; struct max9635_zone_conv max9635_zone_info[255]; atomic_t enabled; int irq; @@ -82,11 +80,6 @@ struct max9635_reg { }; #endif -#ifdef CONFIG_HAS_EARLYSUSPEND -static void max9635_early_suspend(struct early_suspend *handler); -static void max9635_late_resume(struct early_suspend *handler); -#endif - static uint32_t max9635_debug = 0x00; module_param_named(als_debug, max9635_debug, uint, 0664); @@ -580,13 +573,6 @@ static int max9635_probe(struct i2c_client *client, goto err_create_registers_file_failed; } #endif - -#ifdef CONFIG_HAS_EARLYSUSPEND - als_data->early_suspend.level = EARLY_SUSPEND_LEVEL_BLANK_SCREEN + 1; - als_data->early_suspend.suspend = max9635_early_suspend; - als_data->early_suspend.resume = max9635_late_resume; - register_early_suspend(&als_data->early_suspend); -#endif disable_irq_nosync(als_data->client->irq); schedule_delayed_work(&als_data->working_queue, 0); @@ -655,24 +641,6 @@ static int max9635_resume(struct i2c_client *client) return 0; } -#ifdef CONFIG_HAS_EARLYSUSPEND -static void max9635_early_suspend(struct early_suspend *handler) -{ - struct max9635_data *als_data; - - als_data = container_of(handler, struct max9635_data, early_suspend); - max9635_suspend(als_data->client, PMSG_SUSPEND); -} - -static void max9635_late_resume(struct early_suspend *handler) -{ - struct max9635_data *als_data; - - als_data = container_of(handler, struct max9635_data, early_suspend); - max9635_resume(als_data->client); -} -#endif - static const struct i2c_device_id max9635_id[] = { {MAX9635_NAME, 0}, {} @@ -681,10 +649,8 @@ static const struct i2c_device_id max9635_id[] = { static struct i2c_driver max9635_i2c_driver = { .probe = max9635_probe, .remove = max9635_remove, -#ifndef CONFIG_HAS_EARLYSUSPEND .suspend = max9635_suspend, .resume = max9635_resume, -#endif .id_table = max9635_id, .driver = { .name = MAX9635_NAME,