diff --git a/drivers/input/touchscreen/focaltech_v2_mmi/Android.mk b/drivers/input/touchscreen/focaltech_v2_mmi/Android.mk index 3e0996efa910..ce800fd48b26 100644 --- a/drivers/input/touchscreen/focaltech_v2_mmi/Android.mk +++ b/drivers/input/touchscreen/focaltech_v2_mmi/Android.mk @@ -31,7 +31,7 @@ include $(CLEAR_VARS) LOCAL_MODULE := focaltech_v2_mmi.ko LOCAL_MODULE_TAGS := optional LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT) - +LOCAL_ADDITIONAL_DEPENDENCIES += $(KERNEL_MODULES_OUT)/mmi_info.ko ifneq ($(findstring touchscreen_mmi.ko,$(BOARD_VENDOR_KERNEL_MODULES)),) LOCAL_ADDITIONAL_DEPENDENCIES += $(KERNEL_MODULES_OUT)/touchscreen_mmi.ko endif diff --git a/drivers/input/touchscreen/focaltech_v2_mmi/Kbuild b/drivers/input/touchscreen/focaltech_v2_mmi/Kbuild index 68bb6f5db9c2..187de9410c2b 100644 --- a/drivers/input/touchscreen/focaltech_v2_mmi/Kbuild +++ b/drivers/input/touchscreen/focaltech_v2_mmi/Kbuild @@ -41,3 +41,4 @@ ifneq ($(filter m y, $(CONFIG_DRM_PANEL_NOTIFICATIONS)),) EXTRA_CFLAGS += -DCONFIG_DRM_PANEL_NOTIFICATIONS endif KBUILD_EXTRA_SYMBOLS += $(CURDIR)/../../kernel/msm-$(MODULE_KERNEL_VERSION)/Module.symvers +KBUILD_EXTRA_SYMBOLS += $(CURDIR)/$(KBUILD_EXTMOD)/../../../mmi_info/$(GKI_OBJ_MODULE_DIR)/Module.symvers diff --git a/drivers/input/touchscreen/focaltech_v2_mmi/focaltech_core.c b/drivers/input/touchscreen/focaltech_v2_mmi/focaltech_core.c index 29d1870aab86..b06a734f4184 100644 --- a/drivers/input/touchscreen/focaltech_v2_mmi/focaltech_core.c +++ b/drivers/input/touchscreen/focaltech_v2_mmi/focaltech_core.c @@ -51,6 +51,7 @@ #define FTS_SUSPEND_LEVEL 1 /* Early-suspend level */ #endif #include "focaltech_core.h" +#include #ifdef CONFIG_INPUT_TOUCHSCREEN_MMI extern int fts_mmi_dev_register(struct fts_ts_data *ts_data); @@ -1708,6 +1709,12 @@ static int fts_ts_probe_entry(struct fts_ts_data *ts_data) FTS_FUNC_ENTER(); FTS_INFO("%s", FTS_DRIVER_VERSION); + + if (ts_data->client->dev.of_node && !mmi_device_is_available(ts_data->client->dev.of_node)) { + FTS_ERROR("mmi: device not supported\n"); + return -ENODEV; + } + ts_data->pdata = kzalloc(pdata_size, GFP_KERNEL); if (!ts_data->pdata) { FTS_ERROR("allocate memory for platform_data fail");