input: touchscreen: fix build error with CONFIG_FB

Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
Change-Id: Id46e4eca111a8216cfade8038486ffcf233a9b6d
This commit is contained in:
Weixin Zhou
2024-05-14 10:15:36 +08:00
committed by Tao Huang
parent e042ab4129
commit 05bd68e5d5
2 changed files with 8 additions and 12 deletions

View File

@@ -1432,7 +1432,7 @@ static void fts_resume_work(struct work_struct *work)
}
#if defined(CONFIG_FB)
static int fb_notifier_callback(struct notifier_block *self,
static int fts_fb_notifier_callback(struct notifier_block *self,
unsigned long event, void *data)
{
struct fb_event *evdata = data;
@@ -1445,7 +1445,7 @@ static int fb_notifier_callback(struct notifier_block *self,
return 0;
}
if (!(event == FB_EARLY_EVENT_BLANK || event == FB_EVENT_BLANK)) {
if (event != FB_EVENT_BLANK) {
FTS_INFO("event(%lu) do not need process\n", event);
return 0;
}
@@ -1454,18 +1454,14 @@ static int fb_notifier_callback(struct notifier_block *self,
FTS_INFO("FB event:%lu,blank:%d", event, *blank);
switch (*blank) {
case FB_BLANK_UNBLANK:
if (FB_EARLY_EVENT_BLANK == event) {
FTS_INFO("resume: event = %lu, not care\n", event);
} else if (FB_EVENT_BLANK == event) {
if (FB_EVENT_BLANK == event) {
queue_work(fts_data->ts_workqueue, &fts_data->resume_work);
}
break;
case FB_BLANK_POWERDOWN:
if (FB_EARLY_EVENT_BLANK == event) {
if (FB_EVENT_BLANK == event) {
cancel_work_sync(&fts_data->resume_work);
fts_ts_suspend(ts_data->dev);
} else if (FB_EVENT_BLANK == event) {
FTS_INFO("suspend: event = %lu, not care\n", event);
}
break;
default:
@@ -1766,7 +1762,7 @@ static int fts_ts_probe_entry(struct fts_ts_data *ts_data)
#endif
#if defined(CONFIG_FB)
ts_data->fb_notif.notifier_call = fb_notifier_callback;
ts_data->fb_notif.notifier_call = fts_fb_notifier_callback;
ret = fb_register_client(&ts_data->fb_notif);
if (ret) {
FTS_ERROR("[FB]Unable to register fb_notifier: %d", ret);

View File

@@ -12305,7 +12305,7 @@ static void pt_setup_early_suspend(struct pt_core_data *cd)
}
#elif defined(CONFIG_FB)
/*******************************************************************************
* FUNCTION: fb_notifier_callback
* FUNCTION: pt_fb_notifier_callback
*
* SUMMARY: Call back function for FrameBuffer notifier to allow to call
* resume/suspend attention list.
@@ -12318,7 +12318,7 @@ static void pt_setup_early_suspend(struct pt_core_data *cd)
* event - event type of fb notifier
* *data - pointer to fb_event structure
******************************************************************************/
static int fb_notifier_callback(struct notifier_block *self,
static int pt_fb_notifier_callback(struct notifier_block *self,
unsigned long event, void *data)
{
struct pt_core_data *cd =
@@ -12370,7 +12370,7 @@ static void pt_setup_fb_notifier(struct pt_core_data *cd)
cd->fb_state = FB_ON;
cd->fb_notifier.notifier_call = fb_notifier_callback;
cd->fb_notifier.notifier_call = pt_fb_notifier_callback;
rc = fb_register_client(&cd->fb_notifier);
if (rc)