aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2012-02-01 20:26:28 -0800
committerWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2016-09-27 02:50:40 +0200
commitc3418c09c217f2e2984ffd75e5f18dc7d50514b0 (patch)
tree301cd909e173bace01596a59462487e8d257695b
parent02767898f2829da285789d110fc9561c57cbb891 (diff)
downloadkernel_i9300_mainline-c3418c09c217f2e2984ffd75e5f18dc7d50514b0.zip
kernel_i9300_mainline-c3418c09c217f2e2984ffd75e5f18dc7d50514b0.tar.gz
kernel_i9300_mainline-c3418c09c217f2e2984ffd75e5f18dc7d50514b0.tar.bz2
input: misc: gpio_event: remove early suspend
Remove the early suspend handler. Leave the suspend functions for now, they should eventually get called through a userspace interface.x Change-Id: I67f9dafe32fe32577bab93c42b95824db96c215c Signed-off-by: Colin Cross <ccross@android.com>
-rw-r--r--drivers/input/misc/gpio_event.c39
1 files changed, 9 insertions, 30 deletions
diff --git a/drivers/input/misc/gpio_event.c b/drivers/input/misc/gpio_event.c
index d4e5b4d..90f07eb 100644
--- a/drivers/input/misc/gpio_event.c
+++ b/drivers/input/misc/gpio_event.c
@@ -13,7 +13,6 @@
*
*/
-#include <linux/earlysuspend.h>
#include <linux/module.h>
#include <linux/input.h>
#include <linux/gpio_event.h>
@@ -24,7 +23,6 @@
struct gpio_event {
struct gpio_event_input_devs *input_devs;
const struct gpio_event_platform_data *info;
- struct early_suspend early_suspend;
void *state[0];
};
@@ -101,23 +99,19 @@ err_no_func:
return ret;
}
-#ifdef CONFIG_HAS_EARLYSUSPEND
-void gpio_event_suspend(struct early_suspend *h)
+static void __maybe_unused gpio_event_suspend(struct gpio_event *ip)
{
- struct gpio_event *ip;
- ip = container_of(h, struct gpio_event, early_suspend);
gpio_event_call_all_func(ip, GPIO_EVENT_FUNC_SUSPEND);
- ip->info->power(ip->info, 0);
+ if (ip->info->power)
+ ip->info->power(ip->info, 0);
}
-void gpio_event_resume(struct early_suspend *h)
+static void __maybe_unused gpio_event_resume(struct gpio_event *ip)
{
- struct gpio_event *ip;
- ip = container_of(h, struct gpio_event, early_suspend);
- ip->info->power(ip->info, 1);
+ if (ip->info->power)
+ ip->info->power(ip->info, 1);
gpio_event_call_all_func(ip, GPIO_EVENT_FUNC_RESUME);
}
-#endif
static int gpio_event_probe(struct platform_device *pdev)
{
@@ -169,15 +163,8 @@ static int gpio_event_probe(struct platform_device *pdev)
}
ip->input_devs->count = dev_count;
ip->info = event_info;
- if (event_info->power) {
-#ifdef CONFIG_HAS_EARLYSUSPEND
- ip->early_suspend.level = EARLY_SUSPEND_LEVEL_BLANK_SCREEN + 1;
- ip->early_suspend.suspend = gpio_event_suspend;
- ip->early_suspend.resume = gpio_event_resume;
- register_early_suspend(&ip->early_suspend);
-#endif
+ if (event_info->power)
ip->info->power(ip->info, 1);
- }
err = gpio_event_call_all_func(ip, GPIO_EVENT_FUNC_INIT);
if (err)
@@ -198,12 +185,8 @@ static int gpio_event_probe(struct platform_device *pdev)
err_input_register_device_failed:
gpio_event_call_all_func(ip, GPIO_EVENT_FUNC_UNINIT);
err_call_all_func_failed:
- if (event_info->power) {
-#ifdef CONFIG_HAS_EARLYSUSPEND
- unregister_early_suspend(&ip->early_suspend);
-#endif
+ if (event_info->power)
ip->info->power(ip->info, 0);
- }
for (i = 0; i < registered; i++)
input_unregister_device(ip->input_devs->dev[i]);
for (i = dev_count - 1; i >= registered; i--) {
@@ -222,12 +205,8 @@ static int gpio_event_remove(struct platform_device *pdev)
int i;
gpio_event_call_all_func(ip, GPIO_EVENT_FUNC_UNINIT);
- if (ip->info->power) {
-#ifdef CONFIG_HAS_EARLYSUSPEND
- unregister_early_suspend(&ip->early_suspend);
-#endif
+ if (ip->info->power)
ip->info->power(ip->info, 0);
- }
for (i = 0; i < ip->input_devs->count; i++)
input_unregister_device(ip->input_devs->dev[i]);
kfree(ip);