From 0dfe5d60b711d84c743fa018b4ee76dddd7bfd66 Mon Sep 17 00:00:00 2001 From: litong Date: Sun, 27 Sep 2020 12:32:01 +0800 Subject: [PATCH] Modify the compilation error of the device_create function Error: 1. /focaltech_ts.c:1055:3: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation] 2. focaltech_ts.c:2543:11: warning: format string is not a string literal (potentially insecure) [-Wformat-security] Change-Id: I78772d7fc6fcdd12c91e0cd4e49e4b1287e69dc4 Reviewed-on: https://gerrit.mot.com/1760981 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Reviewed-by: Jun Weng Reviewed-by: Jichao Zou Submit-Approved: Jira Key Tested-by: Jira Key --- drivers/input/touchscreen/focaltech_mmi/focaltech_ts.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/input/touchscreen/focaltech_mmi/focaltech_ts.c b/drivers/input/touchscreen/focaltech_mmi/focaltech_ts.c index 928440458ffc..0ee0bf73e08a 100644 --- a/drivers/input/touchscreen/focaltech_mmi/focaltech_ts.c +++ b/drivers/input/touchscreen/focaltech_mmi/focaltech_ts.c @@ -1052,7 +1052,7 @@ static int ft_gpio_configure(struct ft_ts_data *data, bool on) if (gpio_is_valid(data->pdata->reset_gpio)) gpio_free(data->pdata->reset_gpio); - return 0; + return 0; err_reset_gpio_dir: if (gpio_is_valid(data->pdata->reset_gpio)) @@ -2540,7 +2540,7 @@ static int ft_ts_sysfs_class(void *_data, bool create) ts_class_dev = device_create(touchscreen_class, NULL, MKDEV(INPUT_MAJOR, minor), - data, pdata->name); + data, "%s", pdata->name); if (IS_ERR(ts_class_dev)) { error = PTR_ERR(ts_class_dev); ts_class_dev = NULL;