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 <wengjun1@motorola.com>
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
Tested-by: Jira Key
This commit is contained in:
litong 2020-09-27 12:32:01 +08:00 • committed by litong20
commit 0dfe5d60b7

View file

@ -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;