|
@@ -2512,6 +2512,10 @@ exit_check_functionality_failed:
|
|
|
void raydium_ts_shutdown(struct i2c_client *client)
|
|
|
{
|
|
|
|
|
|
+ if (g_raydium_ts->workqueue) {
|
|
|
+ destroy_workqueue(g_raydium_ts->workqueue);
|
|
|
+ g_raydium_ts->workqueue = NULL;
|
|
|
+ }
|
|
|
#if defined(CONFIG_FB)
|
|
|
raydium_unregister_notifier();
|
|
|
#elif defined(CONFIG_HAS_EARLYSUSPEND)
|
|
@@ -2541,18 +2545,22 @@ if (active_panel)
|
|
|
if (gpio_is_valid(g_raydium_ts->irq_gpio))
|
|
|
gpio_free(g_raydium_ts->irq_gpio);
|
|
|
|
|
|
- cancel_work_sync(&g_raydium_ts->work);
|
|
|
- destroy_workqueue(g_raydium_ts->workqueue);
|
|
|
-
|
|
|
raydium_enable_regulator(g_raydium_ts, false);
|
|
|
raydium_get_regulator(g_raydium_ts, false);
|
|
|
|
|
|
+ kfree(g_raydium_ts);
|
|
|
+
|
|
|
i2c_set_clientdata(client, NULL);
|
|
|
}
|
|
|
|
|
|
static int raydium_ts_remove(struct i2c_client *client)
|
|
|
{
|
|
|
|
|
|
+ if (g_raydium_ts->workqueue) {
|
|
|
+ destroy_workqueue(g_raydium_ts->workqueue);
|
|
|
+ g_raydium_ts->workqueue = NULL;
|
|
|
+ }
|
|
|
+
|
|
|
#if defined(CONFIG_FB)
|
|
|
raydium_unregister_notifier();
|
|
|
#elif defined(CONFIG_HAS_EARLYSUSPEND)
|
|
@@ -2580,12 +2588,11 @@ if (active_panel)
|
|
|
if (gpio_is_valid(g_raydium_ts->irq_gpio))
|
|
|
gpio_free(g_raydium_ts->irq_gpio);
|
|
|
|
|
|
- cancel_work_sync(&g_raydium_ts->work);
|
|
|
- destroy_workqueue(g_raydium_ts->workqueue);
|
|
|
-
|
|
|
raydium_enable_regulator(g_raydium_ts, false);
|
|
|
raydium_get_regulator(g_raydium_ts, false);
|
|
|
|
|
|
+ kfree(g_raydium_ts);
|
|
|
+
|
|
|
i2c_set_clientdata(client, NULL);
|
|
|
return 0;
|
|
|
}
|