From eba04b71cc1de32cc4b021af5fb97c82154ca6b0 Mon Sep 17 00:00:00 2001 From: Shoaib0597 Date: Thu, 2 Aug 2018 19:45:24 +0530 Subject: [PATCH] Focal-Tech: Adapt to New Code Format For reference: https://github.com/mncoppola/suterusu/issues/9 Signed-off-by: Shoaib0597 --- drivers/input/touchscreen/ft5xx/focaltech_flash.c | 4 ++-- drivers/input/touchscreen/ft5xx/focaltech_gesture.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/input/touchscreen/ft5xx/focaltech_flash.c b/drivers/input/touchscreen/ft5xx/focaltech_flash.c index 14f6ee1d921ed..e3d6693951a27 100644 --- a/drivers/input/touchscreen/ft5xx/focaltech_flash.c +++ b/drivers/input/touchscreen/ft5xx/focaltech_flash.c @@ -2462,7 +2462,7 @@ static int fts_GetFirmwareSize(char *firmware_name) pr_err("error occured while opening file %s.\n", filepath); return -EIO; } - inode = pfile->f_dentry->d_inode; + inode = pfile->f_path.dentry->d_inode; magic = inode->i_sb->s_magic; fsize = inode->i_size; filp_close(pfile, NULL); @@ -2499,7 +2499,7 @@ static int fts_ReadFirmware(char *firmware_name,unsigned char *firmware_buf) pr_err("error occured while opening file %s.\n", filepath); return -EIO; } - inode = pfile->f_dentry->d_inode; + inode = pfile->f_path.dentry->d_inode; magic = inode->i_sb->s_magic; fsize = inode->i_size; old_fs = get_fs(); diff --git a/drivers/input/touchscreen/ft5xx/focaltech_gesture.c b/drivers/input/touchscreen/ft5xx/focaltech_gesture.c index 460e00b1bf744..04afb8cda5d31 100644 --- a/drivers/input/touchscreen/ft5xx/focaltech_gesture.c +++ b/drivers/input/touchscreen/ft5xx/focaltech_gesture.c @@ -232,7 +232,7 @@ unsigned short coordinate_y[150] = {0}; #ifdef CONFIG_FT5XX_TGESTURE_FUNCTION static int fts_check_gesture(int gesture_id) { - int result; + int result = 0; switch(gesture_id) { case GESTURE_LEFT: result = KEY_GESTURE_LEFT;