From 569541dfb9801b5daa033c3ea17c3782e8994ad1 Mon Sep 17 00:00:00 2001 From: Vedashree Vidwans Date: Thu, 22 Jun 2023 11:50:16 -0700 Subject: [PATCH] tegra: mc-hwpm: update remove driver function Update remove function in mc-hwpm driver to include missing HWPM unregister call. Jira THWPM-8 Change-Id: I1698860647214472e75503e0fd77594e105b2913 Signed-off-by: Vedashree Vidwans Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2924754 Reviewed-by: Adeel Raza Reviewed-by: Ashish Mhetre Reviewed-by: Vasuki Shankar Reviewed-by: Seema Khowala GVS: Gerrit_Virtual_Submit --- drivers/platform/tegra/mc-hwpm.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/platform/tegra/mc-hwpm.c b/drivers/platform/tegra/mc-hwpm.c index 976d4d42..50dd358a 100644 --- a/drivers/platform/tegra/mc-hwpm.c +++ b/drivers/platform/tegra/mc-hwpm.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 /* - * Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved. + * Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. */ #define pr_fmt(fmt) "mc-hwpm: " fmt @@ -248,6 +248,12 @@ static int tegra_mc_hwpm_hwpm_probe(struct platform_device *pdev) static int tegra_mc_hwpm_remove(struct platform_device *pdev) { + hwpm_ip_ops.ip_dev = (void *)pdev; + hwpm_ip_ops.resource_enum = TEGRA_SOC_HWPM_RESOURCE_MSS_CHANNEL; + hwpm_ip_ops.ip_base_address = pdev->resource[0].start; + hwpm_ip_ops.hwpm_ip_reg_op = NULL; + tegra_soc_hwpm_ip_unregister(&hwpm_ip_ops); + return 0; }