diff --git a/drivers/misc/sx9310/sx9310_triple.c b/drivers/misc/sx9310/sx9310_triple.c index 302545988448..7c19a5322267 100644 --- a/drivers/misc/sx9310/sx9310_triple.c +++ b/drivers/misc/sx9310/sx9310_triple.c @@ -31,10 +31,6 @@ #include #include -#if defined(CONFIG_FB) -#include -#endif - /* main struct, interrupt,init,pointers */ #include @@ -1101,49 +1097,6 @@ static int ps_notify_callback(struct notifier_block *self, return 0; } -#if defined(CONFIG_FB) -static void fb_notify_resume_work(struct work_struct *work) -{ - psx93XX_t this = container_of(work, sx93XX_t, fb_notify_work); - psx9310_t pDevice = NULL; - struct input_dev *input_top = NULL; - struct input_dev *input_bottom = NULL; - int ret = 0; - - pDevice = this->pDevice; - input_top = pDevice->pbuttonInformation->input_top; - input_bottom = pDevice->pbuttonInformation->input_bottom; - - if (sx9310_debug_enable) - LOG_INFO("Lcd suspend/resume event,going to force reset\n"); - ret = write_register(this, SX9310_IRQSTAT_REG, 0xff); - if (ret < 0) - LOG_ERR(" Lcd suspend/resume,reset cap sensor failed\n"); -} - -static int fb_notifier_callback(struct notifier_block *self, - unsigned long event, void *data) -{ - struct fb_event *evdata = data; - int *blank; - psx93XX_t this = container_of(self, sx93XX_t, fb_notif); - - if ((event == FB_EVENT_BLANK) && - evdata && evdata->data) { - blank = evdata->data; - if ((*blank == FB_BLANK_POWERDOWN) - || (*blank == FB_BLANK_UNBLANK)) { - if (sx9310_debug_enable) - LOG_INFO("fb event = %lu blank = %d\n", - event, *blank); - schedule_work(&this->fb_notify_work); - } - } - - return 0; -} -#endif - static struct class capsense_class = { .name = "capsense", .owner = THIS_MODULE, @@ -1388,15 +1341,6 @@ static int sx9310_probe(struct i2c_client *client, } } -#if defined(CONFIG_FB) - INIT_WORK(&this->fb_notify_work, fb_notify_resume_work); - this->fb_notif.notifier_call = fb_notifier_callback; - ret = fb_register_client(&this->fb_notif); - if (ret) { - LOG_ERR("Unable to register fb_notifier: %d\n", ret); - goto free_ps_notifier; - } -#endif return 0; } return -ENOMEM; @@ -1441,9 +1385,6 @@ static int sx9310_remove(struct i2c_client *client) pDevice = this->pDevice; pplatData = client->dev.platform_data; if (this && pDevice) { -#if defined(CONFIG_FB) - fb_unregister_client(&this->fb_notif); -#endif power_supply_unreg_notifier(&this->ps_notif); cancel_work_sync(&this->ps_notify_work); diff --git a/drivers/misc/sx9325/sx9325_sar.c b/drivers/misc/sx9325/sx9325_sar.c index 186030808447..d77bfe81d06f 100644 --- a/drivers/misc/sx9325/sx9325_sar.c +++ b/drivers/misc/sx9325/sx9325_sar.c @@ -31,10 +31,6 @@ #include #include -#if defined(CONFIG_FB) -#include -#endif - /* main struct, interrupt,init,pointers */ #include @@ -1019,49 +1015,6 @@ static int ps_notify_callback(struct notifier_block *self, return 0; } -#if defined(CONFIG_FB) -static void fb_notify_resume_work(struct work_struct *work) -{ - psx93XX_t this = container_of(work, sx93XX_t, fb_notify_work); - psx9325_t pDevice = NULL; - struct input_dev *input_top = NULL; - struct input_dev *input_bottom = NULL; - int ret = 0; - - pDevice = this->pDevice; - input_top = pDevice->pbuttonInformation->input_top; - input_bottom = pDevice->pbuttonInformation->input_bottom; - - if (sx9325_debug_enable) - LOG_INFO("Lcd suspend/resume event,going to force reset\n"); - ret = write_register(this, SX932x_STAT2_REG, 0x0f); - if (ret < 0) - LOG_ERR(" Lcd suspend/resume,reset cap sensor failed\n"); -} - -static int fb_notifier_callback(struct notifier_block *self, - unsigned long event, void *data) -{ - struct fb_event *evdata = data; - int *blank; - psx93XX_t this = container_of(self, sx93XX_t, fb_notif); - - if ((event == FB_EVENT_BLANK) && - evdata && evdata->data) { - blank = evdata->data; - if ((*blank == FB_BLANK_POWERDOWN) - || (*blank == FB_BLANK_UNBLANK)) { - if (sx9325_debug_enable) - LOG_INFO("fb event = %lu blank = %d\n", - event, *blank); - schedule_work(&this->fb_notify_work); - } - } - - return 0; -} -#endif - static struct class capsense_class = { .name = "capsense", .owner = THIS_MODULE, @@ -1307,19 +1260,10 @@ static int sx9325_probe(struct i2c_client *client, LOG_ERR( "psy get property failed rc=%d\n", ret); - goto free_ps_notifier; + goto free_fb_notifier; } } -#if defined(CONFIG_FB) - INIT_WORK(&this->fb_notify_work, fb_notify_resume_work); - this->fb_notif.notifier_call = fb_notifier_callback; - ret = fb_register_client(&this->fb_notif); - if (ret) { - LOG_ERR("Unable to register fb_notifier: %d\n", ret); - goto free_fb_notifier; - } -#endif return 0; } return -ENOMEM; @@ -1362,9 +1306,6 @@ static int sx9325_remove(struct i2c_client *client) pDevice = this->pDevice; pplatData = client->dev.platform_data; if (this && pDevice) { -#if defined(CONFIG_FB) - fb_unregister_client(&this->fb_notif); -#endif power_supply_unreg_notifier(&this->ps_notif); cancel_work_sync(&this->ps_notify_work);