From 761db8f8c5143317dc5aefe9832a49bade2b2aac Mon Sep 17 00:00:00 2001 From: zeroblade1984 Date: Fri, 20 Feb 2015 11:43:40 -0500 Subject: [PATCH] drivers: input: Fix DVFS Errors Signed-off-by: zeroblade1984 Signed-off-by: Jackeagle Change-Id: I0fa8531917d09cfb08d19d27ac912a9723a92d44 --- Makefile | 1 + drivers/input/keyboard/gpio_keys.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/Makefile b/Makefile index e11d8af0763..845bd2e93cb 100644 --- a/Makefile +++ b/Makefile @@ -354,6 +354,7 @@ endif # warnings and causes the build to stop upon encountering them. CC = $(srctree)/scripts/gcc-wrapper.py $(REAL_CC) + CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \ -Wbitwise -Wno-return-void $(CF) CFLAGS_MODULE = diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c index 0a848710a08..653151d12bf 100644 --- a/drivers/input/keyboard/gpio_keys.c +++ b/drivers/input/keyboard/gpio_keys.c @@ -421,6 +421,7 @@ static struct attribute_group gpio_keys_attr_group = { .attrs = gpio_keys_attrs, }; +#ifdef CONFIG_SEC_DVFS #ifdef KEY_BOOSTER static void gpio_key_change_dvfs_lock(struct work_struct *work) { @@ -494,6 +495,7 @@ static int gpio_key_init_dvfs(struct gpio_button_data *bdata) return 0; } #endif +#endif static void gpio_keys_gpio_report_event(struct gpio_button_data *bdata) { @@ -526,12 +528,14 @@ static void gpio_keys_gpio_work_func(struct work_struct *work) int state = (gpio_get_value_cansleep(button->gpio) ? 1 : 0) ^ button->active_low; #endif gpio_keys_gpio_report_event(bdata); +#ifdef CONFIG_SEC_DVFS #ifdef KEY_BOOSTER if (button->code == KEY_HOMEPAGE) { gpio_key_set_dvfs_lock(bdata, !!state); } #endif +#endif } static void gpio_keys_gpio_timer(unsigned long _data) @@ -1495,12 +1499,14 @@ static int __devinit gpio_keys_probe(struct platform_device *pdev) error = gpio_keys_setup_key(pdev, input, bdata, button); if (error) goto fail2; +#ifdef CONFIG_SEC_DVFS #ifdef KEY_BOOSTER error = gpio_key_init_dvfs(bdata); if (error < 0) { dev_err(dev, "Fail get dvfs level for touch booster\n"); goto fail2; } +#endif #endif if (button->wakeup) wakeup = 1;