Revert "(CR): utags.ko: force this module unloadable"

This reverts commit 298e2347dfc445415663afbfc2ff1e8e7053a905.

It is not needed anymore because remove_proc_subtree has been added to
GKI whitelist

Change-Id: Ieee190e012ab338b613c81358298a86443d6944b
Reviewed-on: https://gerrit.mot.com/1788233
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
jixj 2020-10-29 14:33:12 +08:00 • committed by Xiaojun Ji
commit 3396f59b2f

View file

@ -1961,11 +1961,6 @@ static int utags_probe(struct platform_device *pdev)
struct ctrl *ctrl;
char buf[UTAGS_QNAME_SIZE];
if (!try_module_get(THIS_MODULE)) {
pr_err("Failed to get this utags module\n");
return -EIO;
}
ctrl = devm_kzalloc(&pdev->dev, sizeof(struct ctrl), GFP_KERNEL);
if (!ctrl)
return -ENOMEM;
@ -2010,12 +2005,6 @@ static int utags_probe(struct platform_device *pdev)
return -EIO;
}
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,4,0)
/* force this driver to be unloadable because the proc tree cannot
be removed in GKI 5.4 */
module_put(THIS_MODULE);
#endif
if (!strncmp(ctrl->dir_name, HW_ROOT, sizeof(HW_ROOT)))
ctrl->hwtag = 1;