mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 21:59:12 -04:00
input: ets_fpc_mmi: fix rmmod issue
When rmmod called, Clear input device regisgered for navigation function. Remove navigation sys entries. Change-Id: I4f101c6f08a81f8c53206edfe5883480ed28cc42 Signed-off-by: haojl2 <haojl2@motorola.com> Reviewed-on: https://gerrit.mot.com/1339672 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Jianqi Yang <yangj@motorola.com> Submit-Approved: Jira Key Reviewed-on: https://gerrit.mot.com/1367087
This commit is contained in:
parent
a376df2ff9
commit
8a19f9b376
2 changed files with 13 additions and 2 deletions
|
|
@ -903,8 +903,11 @@ static int etspi_create_device(struct etspi_data *etspi, bool create) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#if EGIS_NAVI_INPUT
|
||||
uinput_egis_destroy(etspi);
|
||||
sysfs_egis_destroy(etspi);
|
||||
#endif
|
||||
mutex_lock(&device_list_lock);
|
||||
list_del(&etspi->device_entry);
|
||||
mutex_unlock(&device_list_lock);
|
||||
|
|
|
|||
|
|
@ -725,12 +725,19 @@ void uinput_egis_destroy(struct etspi_data *etspi)
|
|||
DEBUG_PRINT("Egis navigation driver, %s\n", __func__);
|
||||
|
||||
|
||||
g_DoubleClickJiffies = 0;
|
||||
g_SingleClickJiffies = 0;
|
||||
|
||||
if (etspi->input_dev != NULL) {
|
||||
input_unregister_device(etspi->input_dev);
|
||||
input_free_device(etspi->input_dev);
|
||||
etspi->input_dev = NULL;
|
||||
}
|
||||
|
||||
#if ENABLE_TRANSLATED_LONG_TOUCH
|
||||
del_timer(&long_touch_timer);
|
||||
#endif
|
||||
|
||||
if (etspi->input_dev != NULL)
|
||||
input_free_device(etspi->input_dev);
|
||||
if (nav_kthread)
|
||||
kthread_stop(nav_kthread);
|
||||
|
||||
|
|
@ -771,6 +778,7 @@ void sysfs_egis_destroy(struct etspi_data *etspi)
|
|||
DEBUG_PRINT("Egis navigation driver, %s\n", __func__);
|
||||
|
||||
if (etspi->spi) {
|
||||
sysfs_remove_group(&etspi->spi->dev.kobj, &attribute_group);
|
||||
platform_device_del(etspi->spi);
|
||||
platform_device_put(etspi->spi);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue