platform: dce: prevent dce driver unloading

DCE-KMD driver does not support reloading of the driver today.
Support will be added in the future.

As a WAR this patch prevents unloading of the driver.

Bug 4239420

Change-Id: I29f60fbaaf99f5f4e22f75b6674bd1a543b83c1a
Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2968906
Reviewed-by: Arun Swain <arswain@nvidia.com>
Reviewed-by: Vinod Atyam <vatyam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Vinod Atyam <vatyam@nvidia.com>
This commit is contained in:
Mahesh Kumar
2023-08-28 08:45:50 +00:00
committed by mobile promotions
parent 837b275df5
commit 4ded4286d6

View File

@@ -254,6 +254,14 @@ static int tegra_dce_probe(struct platform_device *pdev)
} }
} }
/**
* FIXME: Allow tegra_dce.ko unloading.
*/
if (!try_module_get(THIS_MODULE)) {
dce_info(d, "Failed to get lock of DCE Module.\n");
dce_info(d, "modprobe --remove of kernel modules depending on tegra_dce.ko will fail.\n");
}
return 0; return 0;
req_intr_err: req_intr_err: