diff mbox series

[13/23,SRU,OEM-5.6] platform/x86: intel_pmc_core: Remove duplicate 'if' to create debugfs entry

Message ID 20201030060214.780883-19-acelan.kao@canonical.com
State New
Headers show
Series Tiger Lake PMC core driver fixes | expand

Commit Message

AceLan Kao Oct. 30, 2020, 6:02 a.m. UTC
From: Gayatri Kammela <gayatri.kammela@intel.com>

BugLink: https://bugs.launchpad.net/bugs/1899883

A debugfs entry for substate_live_status_registers is created only if
the platform has sub-states, which requires the same condition to create
substate_status_registers debugfs entry. Hence remove the redundant
condition and re-use the existing one.

Cc: Chen Zhou <chenzhou10@huawei.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: David E. Box <david.e.box@intel.com>
Signed-off-by: Gayatri Kammela <gayatri.kammela@intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
(cherry picked from commit 08ec5020bd6cf0102ec92c00ed149d8b76ace5ee)
Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
 drivers/platform/x86/intel_pmc_core.c | 3 ---
 1 file changed, 3 deletions(-)
diff mbox series


diff --git a/drivers/platform/x86/intel_pmc_core.c b/drivers/platform/x86/intel_pmc_core.c
index 0bb730a47c67..648db31fa1b9 100644
--- a/drivers/platform/x86/intel_pmc_core.c
+++ b/drivers/platform/x86/intel_pmc_core.c
@@ -1108,9 +1108,6 @@  static void pmc_core_dbgfs_register(struct pmc_dev *pmcdev)
 		debugfs_create_file("substate_status_registers", 0444,
 				    pmcdev->dbgfs_dir, pmcdev,
-	}
-	if (pmcdev->map->lpm_status_offset) {
 		debugfs_create_file("substate_live_status_registers", 0444,
 				    pmcdev->dbgfs_dir, pmcdev,