DLKM: input: Improve novatek touch driver

Fixed the logic which causes the node /proc/nvt_read_data
can not to be created.

Change-Id: I6e0814297c4ef683ef79055072d2f5e7e385006a
Signed-off-by: wengjun1 <wengjun1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1230750
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jialei Hao <haojl2@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
wengjun1 2018-08-21 16:50:18 +08:00 • committed by Jun Weng
commit 7ddcbe5f89

View file

@ -1952,29 +1952,32 @@ return:
*******************************************************/
int32_t nvt_mp_proc_init(void)
{
int32_t ret = 0;
NVT_proc_selftest_entry = proc_create("nvt_selftest", 0444, NULL, &nvt_selftest_fops);
if (NVT_proc_selftest_entry == NULL) {
NVT_ERR("create /proc/nvt_selftest Failed!\n");
return -1;
ret = -1;
} else {
if (nvt_mp_buffer_init()) {
NVT_ERR("Allocate mp memory failed\n");
return -1;
ret = -1;
} else {
NVT_LOG("create /proc/nvt_selftest Succeeded!\n");
}
return 0;
ret = 0;
}
#if NVT_TOUCH_MP_LENOVO
if (ret == 0) {
NVT_proc_selftest_read_data = proc_create("nvt_read_data", 0444, NULL, &nvt_read_data_fops);
if (NVT_proc_selftest_read_data == NULL) {
NVT_ERR("create /proc/nvt_read_data Failed!\n");
return -1;
ret = -1;
} else {
NVT_LOG("create /proc/nvt_read_data Succeeded!\n");
}
}
#endif
return 0;
return ret;
}
void nvt_mp_proc_remove(void)