From 94555cd54abfc3f4f069b2e43bd97fafe68f664d Mon Sep 17 00:00:00 2001 From: litong20 Date: Mon, 27 Sep 2021 13:06:38 +0800 Subject: [PATCH] Resolve compilation errors for unused functions TP: Resolve compilation errors for unused functions ts_mmi_kobject_get_path. Change-Id: I22b213db2304f4c3c73867ad9625f20715a4a528 Reviewed-on: https://gerrit.mot.com/2077104 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Jichao Zou Submit-Approved: Jira Key --- .../touchscreen/touchscreen_mmi/touchscreen_mmi_class.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/input/touchscreen/touchscreen_mmi/touchscreen_mmi_class.c b/drivers/input/touchscreen/touchscreen_mmi/touchscreen_mmi_class.c index 2ef8bce7edf0..b58a789e16d2 100644 --- a/drivers/input/touchscreen/touchscreen_mmi/touchscreen_mmi_class.c +++ b/drivers/input/touchscreen/touchscreen_mmi/touchscreen_mmi_class.c @@ -184,11 +184,8 @@ static ssize_t path_show(struct device *dev, return (ssize_t)0; } -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)) path = ts_mmi_kobject_get_path(&DEV_MMI->kobj, GFP_KERNEL); -#else - path = kobject_get_path(&DEV_MMI->kobj, GFP_KERNEL); -#endif + blen = scnprintf(buf, PAGE_SIZE, "%s", path ? path : "na"); kfree(path); return blen;