summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordavidycchen <davidycchen@google.com>2021-07-15 13:47:02 +0800
committerDavid Chen <davidycchen@google.com>2021-08-04 02:18:11 +0000
commit175d000bbd514e96c1727ca0eb3ada18b258cac7 (patch)
treeb3867fca28370653f23cb2b4eb3862df81ab2220
parent990a6d8413d52f4d8f4442cb75e988273dc8758d (diff)
downloadfts_touch-175d000bbd514e96c1727ca0eb3ada18b258cac7.tar.gz
touch: fst2: fix build break
bug: 193085179 Signed-off-by: davidycchen <davidycchen@google.com> Change-Id: Ie2f2e41715edda64f78089ad4eec3dc0831b06fa
-rw-r--r--fst2/fts.c14
-rw-r--r--fst2/fts.h1
-rw-r--r--fst2/fts_lib/fts_flash.c2
-rw-r--r--fst2/fts_proc.c16
4 files changed, 12 insertions, 21 deletions
diff --git a/fst2/fts.c b/fst2/fts.c
index be13891..61e6a6f 100644
--- a/fst2/fts.c
+++ b/fst2/fts.c
@@ -279,7 +279,7 @@ static void fts_event_handler(struct work_struct *work)
event_dispatch_handler_t event_handler;
info = container_of(work, struct fts_ts_info, work);
- __pm_wakeup_event(&info->wakesrc, jiffies_to_msecs(HZ));
+ pm_wakeup_event(info->dev, jiffies_to_msecs(HZ));
for (count = 0; count < MAX_FIFO_EVENT; count++) {
error = fts_read_fw_reg(FIFO_READ_ADDR, data, 8);
if (error == OK && data[0] != EVT_ID_NOEVENT)
@@ -557,7 +557,7 @@ static void fts_resume_work(struct work_struct *work)
struct fts_ts_info *info;
info = container_of(work, struct fts_ts_info, resume_work);
- __pm_wakeup_event(&info->wakesrc, jiffies_to_msecs(HZ));
+ pm_wakeup_event(info->dev, jiffies_to_msecs(HZ));
info->resume_bit = 1;
fts_disable_interrupt();
fts_system_reset(1);
@@ -576,7 +576,7 @@ static void fts_suspend_work(struct work_struct *work)
struct fts_ts_info *info;
info = container_of(work, struct fts_ts_info, suspend_work);
- __pm_wakeup_event(&info->wakesrc, jiffies_to_msecs(HZ));
+ pm_wakeup_event(info->dev, jiffies_to_msecs(HZ));
info->resume_bit = 0;
fts_mode_handler(info, 0);
release_all_touches(info);
@@ -979,7 +979,6 @@ static int parse_dt(struct device *dev, struct fts_hw_platform_data *bdata)
log_info(1, "%s: irq_gpio = %d\n", __func__, bdata->irq_gpio);
-
ret_val = of_property_read_string(np, "st,regulator_dvdd", &name);
if (ret_val == -EINVAL)
bdata->vdd_reg_name = NULL;
@@ -1120,13 +1119,12 @@ static int fts_probe(struct spi_device *client)
info->dev = &info->client->dev;
log_info(1, "%s: SET Event Handler:\n", __func__);
- wakeup_source_init(&info->wakesrc, "fts_tp");
info->event_wq = alloc_workqueue("fts-event-queue", WQ_UNBOUND |
WQ_HIGHPRI | WQ_CPU_INTENSIVE, 1);
if (!info->event_wq) {
log_info(1, "%s: ERROR: Cannot create work thread\n", __func__);
error = -ENOMEM;
- goto probe_error_exit_3;
+ goto probe_error_exit_2;
}
INIT_WORK(&info->work, fts_event_handler);
INIT_WORK(&info->resume_work, fts_resume_work);
@@ -1227,9 +1225,6 @@ probe_error_exit_5:
probe_error_exit_4:
destroy_workqueue(info->event_wq);
-probe_error_exit_3:
- wakeup_source_trash(&info->wakesrc);
-
probe_error_exit_2:
fts_enable_reg(info, false);
fts_get_reg(info, false);
@@ -1261,7 +1256,6 @@ static int fts_remove(struct spi_device *client)
fb_unregister_client(&info->notifier);
input_unregister_device(info->input_dev);
destroy_workqueue(info->event_wq);
- wakeup_source_trash(&info->wakesrc);
#ifndef FW_UPDATE_ON_PROBE
destroy_workqueue(info->fwu_workqueue);
#endif
diff --git a/fst2/fts.h b/fst2/fts.h
index 93ab75a..7bd1f1a 100644
--- a/fst2/fts.h
+++ b/fst2/fts.h
@@ -112,7 +112,6 @@ struct fts_ts_info {
* indicate if active or lpm) */
struct notifier_block notifier; /* /< Used for be notified from a
* suspend/resume event */
- struct wakeup_source wakesrc; /* Wake Lock struct */
unsigned long touch_id; /* /< Bitmask for touch id (mapped to input
* slots) */
bool sensor_sleep; /* /< if true suspend was called while if false
diff --git a/fst2/fts_lib/fts_flash.c b/fst2/fts_lib/fts_flash.c
index bdec0b6..453ac8e 100644
--- a/fst2/fts_lib/fts_flash.c
+++ b/fst2/fts_lib/fts_flash.c
@@ -1207,7 +1207,7 @@ int flash_burn(struct firmware_file fw, struct force_update_flag *force_burn)
*/
int full_panel_init(struct force_update_flag *force_update)
{
- int res;
+ int res = OK;
int event_to_search = EVT_ID_NOEVENT;
u8 read_data[8] = { 0x00 };
diff --git a/fst2/fts_proc.c b/fst2/fts_proc.c
index 962dfa5..b8968db 100644
--- a/fst2/fts_proc.c
+++ b/fst2/fts_proc.c
@@ -344,7 +344,7 @@ static ssize_t fts_seq_write(struct file *file, const char __user *buf,
res = ERROR_ALLOC;
goto goto_end;
}
- if (access_ok(VERIFY_READ, buf, count) < OK ||
+ if (access_ok(buf, count) < OK ||
copy_from_user(pbuf, buf, count) != 0) {
res = ERROR_ALLOC;
goto goto_end;
@@ -1031,14 +1031,12 @@ static ssize_t fts_seq_write(struct file *file, const char __user *buf,
* file_operations struct which define the functions for the canonical
*operation on a device file node (open. read, write etc.)
*/
-
-
-static const struct file_operations fts_driver_test_ops = {
- .open = fts_open,
- .read = seq_read,
- .write = fts_seq_write,
- .llseek = seq_lseek,
- .release = seq_release
+static const struct proc_ops fts_driver_test_ops = {
+ .proc_open = fts_open,
+ .proc_read = seq_read,
+ .proc_write = fts_seq_write,
+ .proc_lseek = seq_lseek,
+ .proc_release = seq_release
};
/**